WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
Exclude present post from links widget displays (3 posts)

  1. redsalmon
    Member
    Posted 2 years ago #

    There must be a simple answer to this but i can't find it.

    How can i exclude the present post from a widget list linking posts in same category.

    eg i have a category 'fruit' , includes posts 'apple', 'banana', 'orange'

    if viewing post 'apple' using logic in_category('fruit') widget should only display links to 'banana' and 'orange' .

    if viewing post 'banana' using logic in_category('fruit') widget should only display links to 'apple' and 'orange' .

    any hints helpful, thanks

    http://wordpress.org/extend/plugins/widget-logic/

  2. alanft
    Member
    Plugin Author

    Posted 2 years ago #

    while widget logic can in principle modify the content of a widget (using the widget content filter) it is not something that extends very easily to the sort of function you are after. You should contact the widget creator with that suggestion or look for an alternative widget that has that option.

  3. redsalmon
    Member
    Posted 2 years ago #

    Thanks Alan, i kind of suspected this.

    Over to widget creator >> default widget display should exclude presently viewed post from list of links in widget ? This default behaviour would fit more use cases than not and save having to create (lots of) categories just to use for widgets.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic