WordPress.org

Support

Support » How-To and Troubleshooting » Single Category Front Page with Navigation

Single Category Front Page with Navigation

  • 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.

  • The topic ‘Single Category Front Page with Navigation’ is closed to new replies.