not all posts in child categories showing up
I was hoping someone out there in WP-genius land could shed some light on what I am doing wrong here. My “Blog” posts all exist under the parent category “Blog Posts” (although I have other parent categories that serving different purposes). I have created a page template with a custom query that calls my posts and paginates the results just fine if I am grabbing “all” posts in all categories (which I do not want to do). Ideally I would like to display all posts in the parent (Blog Posts) and all it’s children but when I use the following I only get the first 3 posts (even though I know I have lots more):
$paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
‘paged’ => $paged,
‘category_name’ => ‘Blog Posts’,
‘posts_per_page’ => 5,
$temp = $wp_query;
$wp_query = null;
$wp_query = new wp_query();
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>`
Any feedback would be greatly appreciated. Thanks in advance for looking!
- The topic ‘not all posts in child categories showing up’ is closed to new replies.