WordPress.org

Support

Support » Plugins and Hacks » Widget Logic » [Plugin: Widget Logic] Conditional Tags for a single post from a category?

[Plugin: Widget Logic] Conditional Tags for a single post from a category?

  • cruxwireweb

    @cruxwireweb

    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/

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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?

    Plugin Author alanft

    @alanft

    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!

    How to use include page and not include page.

    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’)

    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’)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Widget Logic] Conditional Tags for a single post from a category?’ is closed to new replies.
Skip to toolbar