Forums

Exclude category from recent post widget (4 posts)

  1. jak007
    Member
    Posted 1 year ago #

    i've managed to exclude a category from the main page, but.. i've been trying to exclude a category from Recent Posts located in footer area and still cannot figure it out. i'm not sure what should i target.

    would appreciate help!!

    http://ultimatescotchwhisky.com.gridhosted.co.uk

  2. K-Fella
    Member
    Posted 1 year ago #

    If the widget doesn't include any option to exclude categories, try using the Widget Logic plugin.

  3. jak007
    Member
    Posted 1 year ago #

    thanks. i'm not sure if this plugin can resolve the problem.
    i'd like one of my categories to be completely removed from the query, because this category include slide posts.

    can i still do it using this plugin? what's the code to include then?

  4. K-Fella
    Member
    Posted 1 year ago #

    That plugin allows the use of Conditional Tags. To exclude a certain category you would use the following code:

    ! in_category(1) // where the number is the category id

Topic Closed

This topic has been closed to new replies.

About this Topic