WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
Conditional Tags for a single post from a category? (7 posts)

  1. cruxwireweb
    Member
    Posted 3 years ago #

    I'm using Widget Logic to display particular widgets on category pages. I'd like the widgets to also display on the single page version of any posts within that category. I can't see any way to do that short of adding each new post to the widget logic statement in the widget, and that's obviously not realistic.

    Any idea how I could write the Widget Logic statement to do this? I've looked at http://codex.wordpress.org/Conditional_Tags, but am not seeing anything.

    Thanks!

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

  2. Motoxxx
    Member
    Posted 3 years ago #

    I am having a very similar issue. I was wondering if you could do this based on the URL slug of the post and use that to actually call which widget is used.

    Did you ever get this resolved?

  3. alanft
    Member
    Plugin Author

    Posted 3 years ago #

  4. Motoxxx
    Member
    Posted 3 years ago #

    Thanks Alanft. I am using that and it is working fine.

    I have another question for you that I will start another thread for.

    Thanks in advance!

  5. mshuong
    Member
    Posted 3 years ago #

    How to use include page and not include page.

  6. Motoxxx
    Member
    Posted 3 years ago #

    When you have the plug in installed whatever page you want to have that widget appear on simply put is_page('page-name') in the widget logic field. That pulls that widget just for that one particular page. You can do the same thing for single posts using is_single('post-name')

  7. Motoxxx
    Member
    Posted 3 years ago #

    If you want to use a widget for multiple pages you can do that by using separating the calls with two of the pipe symbols like this...

    is_page('page-name1') || is_page('page-name2') || is_page('page-name3')

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic