WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Exclude categories. from 'home' but not from 'featured' section (4 posts)

  1. Yemoonyah
    Member
    Posted 5 years ago #

    Hi

    I'm trying to exclude my shop categories from my Home page (+widgets and feeds) but not from the featured section on my home page (the slider right under the slide show). I tried the Advanced Category Excluder plugin but it it will only exclude from home AND featrured section.

    I'd be grateful for any suggestions.

  2. DjZoNe
    Member
    Posted 5 years ago #

    In this case you should use "suppress_filters=1" in your query_posts to get featured content. This way no plugin can touch them.

  3. Yemoonyah
    Member
    Posted 5 years ago #

    Thanks for the help!

  4. 1800collect
    Member
    Posted 5 years ago #

    Any clues on how to get around this if your "Featured section" is using a filter?

    I'm trying to get the most recent event posted to the homepage, but I want all other events to not show up.

    So if I use suppress_filters I lose the filter I need.

    function filter_where($where = '') {
    				$where .= " AND post_date >= '" . date('Y-m-d') . "'";
    				return $where;
    			}
    			add_filter('posts_where', 'filter_where');

Topic Closed

This topic has been closed to new replies.

About this Topic