WordPress.org

Support

Support » How-To and Troubleshooting » Help with dynamic links

Help with dynamic links

  • What I’m trying to do is set up a page where WordPress runs all the seperate pages, based on categories. i.e., anything posted to the “Front Page” category would load on the mainpage, and then I could use a query string to link to all the other pages based on the category the posts are made under.

    Question is, how do I make it so the index displays only posts from one certain category by default, without adding a query string to the URL?

Viewing 1 replies (of 1 total)
  • Go to the top of your index.php template on the line just above:

    require('./wp-blog-header.php');

    and insert this:

    if (empty($_SERVER['QUERY_STRING'])) {
    $cat = "IDOFCATEGORY";
    }

    Change IDOFCATEGORY to the numeric ID for the category you want displayed on your home blog page.

Viewing 1 replies (of 1 total)
  • The topic ‘Help with dynamic links’ is closed to new replies.