Navigation Links in Custom Loop
-
I want one category treated differently than all the other categories on my page. I want the one category to have its own verbiage on top and to be sorted ASC, rather than DESC.
I feel like maybe I’m making this too complicated, but here’s what I’ve done so far.
Created a category-1.php file modeled after the category.php file (#1 being the ID for the category I want to mess with) and inside that I added the verbiage I wanted and then called out the following:
get_template_part( 'loop', 'episodes' );
Then I created a loop-episodes.php file modeled after the standard loop.php file and added the following line right before the loop starts:
<?php query_posts( 'order=ASC&orderby=date' ); ?> - my new line <?php while ( have_posts() ) : the_post(); ?>
Only the indicated line is mine, the line below was already in the loop.php file.
So anyway, so far so good. My custom verbiage shows up only when I click that one category, and the posts show up in ASC order. Mission accomplished!
Except…
The navigation links don’t work. Y’know, the “Older posts” and “New posts” link. Click on either displays the same posts I was just looking at. In other words, posts 1-5 are on the page, I click “Older posts” and posts 1-5 show up again.
Help?
- The topic ‘Navigation Links in Custom Loop’ is closed to new replies.