Opened 15 years ago
Closed 15 years ago
#13241 closed defect (bug) (fixed)
query_posts stoped working on front page
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.0 | Priority: | high |
Severity: | normal | Version: | 3.0 |
Component: | Query | Keywords: | |
Focuses: | Cc: |
Description
I am using wordpress 3.0, I upgraded to the latest nightly build. Everything else is working fine except for a small piece of code I have been using on a lot of my themes..
<?php $parent = $post->ID; ?>
<?php
query_posts('orderby=menu_order&order=ASC&posts_per_page=-1&post_type=page&post_parent='.$parent);
?>
After some debugging I realised that in the latest nightly build this code was changed in wp-includes/query.php Correct is_* for page_on_front and page_for_posts
if ( $this->is_home &&
'page' == get_option('show_on_front') && get_option('page_on_front') &&
( empty($query) !array_diff( array_keys($this->query), array('preview', 'page', 'paged', 'cpage') ) ) ) {
$this->is_page = true;
$this->is_home = false;
$qvpage_id? = get_option('page_on_front');
Correct <!--nextpage--> for page_on_front
if ( !empty($qvpaged?) ) {
}
}
I am not sure if this is a bug or I might need to find a work around. I hope my explanation is clear enough.
Seems I've misunderstood $this->query to be an array. It actually contains the raw query (either the result of WP_Rewrite or the string passed in, etc.
Fix upcoming.