I'm using the Showtime wordpress开发者_StackOverflow theme which builds a blog based on a single category.
I modified it and added a query_posts('cat='.$category_id.''.$temp.'&posts_per_page='.get_option('posts_per_page')); in front of the loop to get multiple categories back.
However, this query disables pagination and makes every page the same posts.
I guess i would have to modify the orignal wp-query the theme uses? Where is it usually located as I cannot find it?
Thanks
I ended up doing this:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts('cat='.$category_id.''.$temp.'&paged='.$paged.'&posts_per_page='.get_option('posts_per_page')); // choose which category posts are shown
Try adding
wp_reset_query();
After you loop on your query_posts
精彩评论