WordPress.org

Ready to get started?Download WordPress

Forums

Widget Logic
WIdget Logic stopped working when inserting conditionals (4 posts)

  1. jrstaatsiii
    Member
    Posted 3 years ago #

    Hey all,

    This is a bit strange, and I have a feeling it is caused by something I did.

    I had widget logic installed and working correctly. At some point in my theme development (and unfortunately I cannot confirm when) conditional widgets stopped showing up. It works if I delete any of the conditionals (and allow it to run on all pages) but as soon as I add something like, is_page() it will not show up at all. I did build a CPT and I am pretty sure that it worked before I added the Custom Post Type, but I can't for the life of me rationalize why that would cause it to break.

    Any suggestions?

    Rich

  2. alanft
    Member
    Plugin Author

    Posted 3 years ago #

    try simply 'true' and 'false', then if they work (true shows the widget, false hides it), there is something up with the coding. Another thing to try is the wp_reset_query option.

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

  3. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    please post a link to your site;
    so someone might have a chance to check if you may be using any custom queries or anything that might distort the original query_string.

    general, make sure to end all custom query loops with wp_reset_query() to bring the query_string back to 'normal'

    (this might also be caused by bugged plugins)

  4. jrstaatsiii
    Member
    Posted 3 years ago #

    thank you very much for the information, and yes it WAS in fact that I had forgotten to add wp_reset_query() -- much obliged.

    Rich

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic