Next post link not working correctly – looping last two posts
-
I have problem with next portfolio link. Seems it’s looping between two last portfolio items. Previous works fine. I am using the same code for articles (posts) and it works fine there. Do you know why is this and how to fix it?
<?php if(in_category( 'web-design-blog' )) { ?> <?php next_post_link('%link','<i class="arrow_carrot-left"></i> Next article', TRUE, 'category'); ?> <?php previous_post_link('%link', 'Previous article <i class="arrow_carrot-right"></i>', TRUE, 'category'); ?> <?php } else if(in_category( 'web-design-portfolio' )) { ?> <?php next_post_link('%link','<i class="arrow_carrot-left"></i> Next project', TRUE, 'category'); ?> <?php previous_post_link('%link', 'Previous project <i class="arrow_carrot-right"></i>', TRUE, 'category'); ?> <?php } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Next post link not working correctly – looping last two posts’ is closed to new replies.