• Hi there, hope everyone is having a great Christmas.

    I’m working on developing a theme for my WordPress site which is going to be used as a portfolio for my graphics work, as well as a blog.

    I plan to post the portfolio as seperate blog posts in a category called ‘Portfolio’.
    On the front page of my site I want to have my blog but by default I presume posts will appear on my main page in chronological order.

    Is it possible to make posts to the Portfolio category only show up when the Portfolio page is selected, or will they have to be displayed on the main page also?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Determine which page template is used to display your front page – some themes use home.php while others use index.php

    Whichever it is, place the following at the very top …

    <?php
       if (is_home()) {
          query_posts("cat=-X");
       }
    ?>

    … where X is the numerical ID of the category you want to exclude.

    More reading on the query_posts function.

    Thread Starter creationtwentytwo

    (@creationtwentytwo)

    Excellent,

    Thanks very much for the info / link.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Selective displaying of blog posts’ is closed to new replies.