[wp-trac] [WordPress Trac] #17339: Bug w/ Custom Post Type Archive Page and WP_Query
WordPress Trac
wp-trac at lists.automattic.com
Sat May 7 17:13:07 UTC 2011
#17339: Bug w/ Custom Post Type Archive Page and WP_Query
-------------------------------+------------------------------
Reporter: whatadewitt | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.1
Severity: normal | Resolution:
Keywords: reporter-feedback |
-------------------------------+------------------------------
Comment (by whatadewitt):
I didn't write this code, so please forgive it's "all over the
place"-edness
I have the following
{{{
$items = get_option("featured_blog_cats");
$args = array(
'include'=>implode(",", $items),
'taxonomy'=>'fbblogcat',
'hide_empty'=>0
);
}}}
I don't modify the args array, but there is some work done with it,
there's then the following after a bit of work is done:
{{{
$args = array( 'posts_per_page'=>4 );
$args = array_merge( $args, $wp_query->query );
query_posts($args);
// loop starts here
}}}
I have before added
{{{
echo "<pre>";
print_r($args);
echo "</pre>";
}}}
Which has given me:
{{{
Array
(
[posts_per_page] => 4
[post_type] => [CUSTOM POST TYPE NAME]
)
}}}
on my page.
If it helps, I did some checking. It wasn't as if it was grabbing 10
results, then only displaying the first four and on page 2 I had posts 11
- 14, it was showing the correct posts... but it appeared as though that
10 in my settings was causing issues.
Appreciate your time looking into this matter!
--d
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17339#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list