• would like to exclude one category from the recent post widget,
    how do i go about doing this without using a plugin?

    I think i suppose to add

    ‘cat’=-3

    somewhere, or create a function

    to put in my functions.php file. like a filter

Viewing 7 replies - 1 through 7 (of 7 total)
  • You can use it List category posts

    Thread Starter clickmac

    (@clickmac)

    thanks wprock, but i would like some type of code to use, instead of a plugin

    any ideas?

    then create a custom shortcode or plugin using query_posts() function. $args will be like this

    query_posts(‘cat=-3&posts_per_page=5’);

    you can pass the post limit via parameter.

    Thread Starter clickmac

    (@clickmac)

    is it necessary to create a whole plugin just to filter the recent post widget?

    so that one category would be excluded,

    and the link you gave, it uses shortcode, but i would like a option in recent post widget….

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Please post your answer here, these forums are not meant for hotlinking.

    Thread Starter clickmac

    (@clickmac)

    well i got this code from the site

    ‘category__not_in’ => array( 60 ) and inserted it in the default widgets.php file

    where 60 is the category id number

    Thread Starter clickmac

    (@clickmac)

    ok it did work but it didnt.

    it messes with the rss feed widget, and other widgets

    i would like to know how to do this,anyone?

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘recent post widget, how to exclude category’ is closed to new replies.