• I would like to make posts but keep them in the background (not have them listed on the front page.)
    It would seem that there is a plugin to keep a certain category from posting to the front page, any ideas?
    Many thanks!
    Parental

Viewing 2 replies - 1 through 2 (of 2 total)
  • Perhaps you need to look at Creating_a_Static_Front_Page?

    You’re in luck… I found a bit of code that does this (not a plugin), and it’s designed to do precisely what you ask. Courtesy of a commenter on a WordPress development site:

    ..add this to your functions.php file: (Just replace the 17 with the category ID of [category to be excluded]). That will keep it out of the feed, search results, and homepage.

    <?php
    function eventsFilter($query) {
    if ($query->is_feed || $query->is_home || $query->is_search) {
    $query->set(‘cat’,'-17′);
    }
    return $query;
    }
    add_filter(‘pre_get_posts’,'eventsFilter’);
    ?>

    Just as an FYI, I had to omit the opening and closing PHP tags in the above code and slip what was left between the existing PHP tags in the functions.php file to get it to work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘any plugin that keeps category from listing on front page?’ is closed to new replies.