[wp-trac] [WordPress Trac] #41226: Static "posts page" preview not working
WordPress Trac
noreply at wordpress.org
Tue Dec 5 17:05:58 UTC 2017
#41226: Static "posts page" preview not working
-------------------------------+------------------------------
Reporter: emross | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version:
Severity: normal | Resolution:
Keywords: needs-testing | Focuses: administration
-------------------------------+------------------------------
Comment (by adpawl):
I can confirm.
'''Test settings:'''
page_on_front: 1
show_on_front: page
page_for_posts: 9
'''posts page (normal)'''
page_id: 9
is_home(): bool(true)
is_page(): bool(false)
is_preview(): bool(false)
is_front_page(): bool(false)
'''posts page (preview)'''
page_id: 1
is_home(): bool(false)
is_page(): bool(true)
is_preview(): bool(true)
is_front_page(): bool(false)
'''Cause''':
'''class-wp-query.php'''
{{{#!php
<?php
if ( $this->is_home && (empty($this->query) || $q['preview'] == 'true') &&
( 'page' == get_option('show_on_front') ) && get_option('page_on_front') )
{
$this->is_page = true;
$this->is_home = false;
$q['page_id'] = get_option('page_on_front');
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/41226#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list