WordPress.org

Ready to get started?Download WordPress

Forums

Hide posts from a certain category (6 posts)

  1. keikenti
    Member
    Posted 8 years ago #

    Hello,

    are there any plugins out there that adds a "don't show on frontpage" checkbox in your Write Post section? I want the readers to only find certain posts in their respective categories or through links on a Page.

    The plugins I did find was written to restrict the posts to a user's access level, but it doesn't really fit with my needs. Also, doing changes to the template (if post is in a certain category then skip) would mess up with the "Previous posts" counter.

  2. dylanhassinger
    Member
    Posted 8 years ago #

    i am looking for this as well. semilogic has an "opt-in" plugin, but not an "opt-out" one. if you find the answer, please post it here!! thanks

  3. Mark (podz)
    Support Maven
    Posted 8 years ago #

  4. keikenti
    Member
    Posted 8 years ago #

    Oh, would seem like adding:


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

    solves my problem although it does require some "hard coding". I would have prefered having a more versatile way though. Like, I think a "sticky" or "slippery" option should be part of the WordPress system in the first place.

  5. lellie
    Member
    Posted 8 years ago #

    elegant category invisibility can exclude specific categories..

  6. keikenti
    Member
    Posted 8 years ago #

    Actually, the code above has a very bad bug:

    <?php
    if (is_home()) {
    if (isset($_REQUEST['paged'])) {
    query_posts("cat=-12&paged=" . $_REQUEST['paged']);
    } else {
    query_posts("cat=-12");
    }
    }
    ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.