Widget Logic
a little JS Widget Logic code generator (3 posts)

  1. Steve Taylor
    Posted 5 years ago #

    Widget Logic is fantastic, but the code is sometimes beyond my clients. Section Widget's interface is more friendly, but from what I remember, it doesn't have a "not" operator equivalent, meaning if you select all pages except for a few, when you add a new page, you'd have to go back and manually add it if you want the widget there. Plus, it looks like Section Widget's not being maintained. It's not as flexible as Widget Logic, of course, and having both is a little confusing.

    I thought an interesting half-way solution would be a little Javascript "Widget Logic Generator". My code's below. It's designed to go into a theme's functions.php, and should slip itself in below the Widget Logic options on the widgets admin page. It's not "complete", but can be easily adapted to add more functionality.

    Please post any corrections, suggestions, pointers to other widget plugins that bridge this gap.

    I assume this kind of interface is a bit too much to include inside each widget. But with this, at least clients can generate basic WL code, and developers still have the power of the WL field.

    [Code moderated as per the Forum Rules. Please use the pastebin]


  2. Qurl
    Posted 5 years ago #

    Hi gyrus,
    I think Dynamic Widgets can help you in being a bridge in the gap.

  3. Steve Taylor
    Posted 5 years ago #

    OK, here's the code in the pastebin:


    Thanks qurl, I'll have to check that out.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic