Recent Topics

How to Show all Posts through Category Links?

Started by on Mar 22, 2005 – Contents updated: Mar 22, 2005

Mar 22, 2005 15:44    


I recently set up a travel log for my sister who's traveling the world. Throughout her journies they're posting pictures and a log of their trip. It seems her husband's entries are very long and indepth so there would be a lot of scrolling if we didn't categorize them. So we made up categories for each country (continent/region) they travel to and put each entry in their appropriate category.
The category links work great for all the entries in the current month, but that's it. Let's say I want to view an entry from January, but its in category "United States". Now I have entries for the US in both January and March, but the category link for "United States" only shows March's entries and if I click the January archives link, it shows all categories.
Is it possible, to show all entries for "United States" if that category link is chosen?

Thanks for your help.

Mar 22, 2005 16:20

This won't display all of the posts, but it will allow you to navigate through them. This is context sensitive, so if you're looking at the archives for a particular month, it will scroll through them, or if you're looking at a particular category, it will only display the posts of that cat.

Anyway, you can put this anywhere in your _main.php file, as long as it's not within the posts loop (the part that says -- START OF POSTS -- to -- END OF POSTS --).

<p class="center"><strong>
<?php posts_nav_link(); ?>

You obviously don't need to use the formatting, it will just centre the link.

Mar 22, 2005 16:26

Hey, that works great!
Thanks for your quick help on this!


Form is loading...

CMS + forums – This forum is powered by b2evolution CMS, a complete engine for your website.