• This is my first time using Thesis and I’m working on a complex site. I’m using a custom loop to create the category pages, since they have several different sections requiring multiple loops.

    I had everything working fine, but as soon as I try and limit the number of posts showing to 6, it starts showing posts from all categories, instead of posts from just the category relevant to the page I’m on.

    Working code:

    if (have_posts()){
    			while(have_posts()) {
    			the_post();
     				if($post->post_type == 'page') continue;
     				setup_postdata($post);
     				$categories = get_the_category();

    Broken code:

    if (have_posts()){
    			$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    			query_posts('posts_per_page=6&paged=' . $paged);
    			while(have_posts()) {
    			the_post();
     				if($post->post_type == 'page') continue;
     				setup_postdata($post);
     				$categories = get_the_category();

    Any idea what’s happening? I need to make it so only 6 posts show on the page.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show recent postings in Category page with Thesis custom loop’ is closed to new replies.