The error I'm seeing is that the way I currently have my category page set up, if a post on that page has more than 1 category, the loop won't load the posts that follow the one with multiple categories.
Currently I have about 10 posts in my test installation of WordPress. 9 of them have the same category, lets call it "Surprised". 1 of them has 3 categories. When I go to the category for page "Surprised, instead of seeing 10 posts on that page, including the one with 3 different categories, the page stops loading the category posts that follow it.
Here is an example of one of the loops that ate on the category page (there are 4 loops total and all of them behave the same presently).
<? get_header(); ?>
<?
$cat_array = get_the_category();
$cat_name = esc_html($cat_array[0]->name);
?>
<?
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
'category_name' => $cat_name,
'paged' => $paged,
'posts_per_page' => 2
);
$wp_query = new WP_Query($args);
while($wp_query->have_posts()) : $wp_query->the_post(); ?>
<div class="post-box pane">
<a href="<? the_permalink(); ?>" class="article">
<h3 class="title"><? echo get_the_title(); ?></h3>
<? echo the_post_thumbnail('smaller-general-thumb', array('class' => 'thumb')) ?>
</a>
</div>
<? endwhile; wp_reset_postdata(); ?>
The reason I'm doing 4 sections with different loops is because each section has a specific number of posts in it. I have to limit the number of posts that show for a section, so I create a new loop and I limit the posts for that loop by paging them and limiting posts per page.
get_the_category()
again. Simply do a simple WP Loop (the loop), here you can see: github.com/Automattic/_s/blob/master/archive.php