Single Category Front Page with Navigation (1 post)

  1. Mark McKibben
    Posted 10 years ago #

    I'm trying to get WordPress 1.22 to display X posts from a single category when you visit the main page but also to have navigation links at the bottom so that you can easily get to the older posts. After much searching in these forums, it looks like the best solution for the single category is to use this bit of PHP:
    if (empty($_SERVER['QUERY_STRING'])) {
    $cat = "1";

    The problem I'm having is the site I'm working on has 10 categories and when I use the above PHP; both category 1 & category 10 are displayed. I'm hoping somebody out there has a suggestion on how to get only cat=1 to display and to still allow me to use posts_nav_link.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.