WordPress.org

Ready to get started?Download WordPress

Forums

One category as homepage (1 post)

  1. tastymouse
    Member
    Posted 3 years ago #

    I want only post of one category on my homepage. I can do this with:
    <?php
    if (is_home()) {
    query_posts("cat=-1,-4,-6");
    }
    ?>

    But this gives a couple of issues: when visitors click a read more or comment link, the active state of menu-link disappears. There is no current-menu-parent.
    And in the previous-next navigation I also get posts from the other categories.

    So I'd like WP to show a specific category as home. I could use a redirect from my domain tot the category, but that is a no-go because of search engines.
    Is there a way to make a specific category the homepage, like it is possible to chose a static page as home?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags