any plugin that keeps category from listing on front page? (3 posts)

  1. ParentalControlApps
    Posted 5 years ago #

    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!

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    Perhaps you need to look at Creating_a_Static_Front_Page?

  3. William
    Posted 5 years ago #

    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.

    function eventsFilter($query) {
    if ($query->is_feed || $query->is_home || $query->is_search) {
    return $query;

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic