WordPress, GPL and Widget Context

Definitely check out the special episode of WordPress Weekly podcast (RSS) hosted by Jeff Chandler where Matt Mullenweg explains why WordPress, GPL and Open Source matters.

I am finally publishing my Widget Context plugin as an α release at the official plugin repository. If you find a bug, or if you know how to fix that bug where the context settings are not saved for widgets that are added fresh to the sidebar on the first ‘Save’, then please leave a comment.

Widget Context Plugin in Action

Here is what this plugin adds at the end of every widget in the Widget Management area:

Widget Context in Action

Widget Context in Action

Use Contact Form 7 to collect business leads and enquiries? I created Storage for Contact Form 7 plugin which stores them safely in WordPress database.

Get it now for only $18 →

29 Comments

  1. Aouni says:

    Thank you Kaspars, should this replace Widgets Logic?

    • Kaspars says:

      Aouni, I think that Widget Context is a bit easier (and faster) to use than Widget Logic, however there might be situations when you needs custom PHP rules.

  2. Cristi says:

    really useful plugin. Any plans to upload it to the WordPress.org list of plugins?

  3. Jeffro2pt0 says:

    Not sure if you received my initial bug report but I think widget context does not know the difference between one text widget and another. Based on my testing, for example you can have three different text widgets assigned to three different places but you’ll end up seeing all three in each place.

  4. Raju says:

    unique n nice, would love to see it added to wordpress.org as well

  5. combola says:

    Superb plugin but when I activate the plugin all my widgets gone.

    • Kaspars says:

      combola, yes — this is currently the default behavior of widgets which don’t have the visibility settings applied. Try configuring them under the Widget Management.

  6. Michael Thompson says:

    Hello — I like your widget but I am having difficulty with specific URLS. I am using WordPress with a static front page called “home”. I am looking to have a different sidebar for my blog vs the other static pages.

    When I check the boxes they seem to work fine but when I put in “blog” or “/blog” or “/blog/” nothing happens. I suspect I am using the wrong terminology for the page names. Can you advise?

    Thanks!

    Michael

  7. Kevin says:

    Nice plugin Kaspars!

    We developed a similar plugin a few months ago. It is available for FREE download here:
    http://tomuse.com/wordpress/widget-locationizer

  8. Brad says:

    Kaspar:

    Wonderful plugin, much needed. I currently setting using wp 2.7 + atahualpa 3.1.7 as a CMS, and your plugin works perfectly. Thanks!

  9. Sean Daily says:

    I tried to make this work on our WP 2.7.1 blog but some odd behavior occurred. We have a custom sidebar-top area in our template with a widget installed, and it wouldn’t appear even when configured to do so on every page.

    Also, in the made sidebar of the template, we were not able to get any widgets to suppress display (for example, on the homepage) even when the appropriate checkbox was checked. We definitely saved changes and cleared the browser cache when testing this.

    • Kaspars says:

      Sean, the configuration for displaying widget on every page should be the following — display on every page except selected and with no checkboxes selected. Is it the way you have it currently configured?

      Do you use a custom static home page or a default one?

  10. Sean Daily says:

    Double-checked the config and it all looks right. We use the default home page, not a custom static.

    • Kaspars says:

      The problem which Sean had was caused by the plugin checking for variable $paged being < 1 to determine if it is the home page that is currently being viewed. It should have been if $paged < 2, and it has been fixed now in 0.34.

  11. Ray says:

    About the wildcard functionality…

    Say we use a wildcard of “/category/example/*”

    If we have a custom permalink structure of “/%postname%/”, does the wildcard still target category posts made in the “example” category?

    • Kaspars says:

      Ray, no — it’s not that smart. I will try to implement this functionality in one of the next releases. The only problem is that it will add even more input fields to every widget settings, but I guess it would be worth it.

  12. Sean Daily says:

    Thanks for the updates Kaspar!

  13. Drew says:

    Hey… I might be going crazy here but when I check “every page except” the results are the exact opposite, ie. the widget is only on that page.

    When I check “only on page selected” the widget appears on every other page.

    Am I the only one having this problem?

    Thanks

  14. Jeffro says:

    No, you certainly are not the only one experiencing this problem. I think you have to save those settings twice in a row for them to actually stick.

  15. Drew says:

    Kaspars, Thanks for your update.

    The new update however did not fix my problem. I still have the “Appears on every page accept” box ticked and my widget is ONLY showing up on the blog page.

    Am I using the correct language by putting

    in the text area and ticking “single page”?

    Thanks again.

  16. Kaspars says:

    Am I using the correct language by putting … in the text area and ticking “single page”?

    Drew, it looks there is something missing in the description above. Could you please give a detailed description of what you are trying to achieve and what are the widget context settings you have specified.

  17. Drew says:

    I am trying to get a widget to appear only on the static “blog page”

    The widget contex setting I am using are as follows:

    *Display only on selected

    *Single page

    In text area I have put: <blog>

    It does not work with those settings.

    If I then change the first setting to:

    *Display on every page except

    then it works, which would be fine but I am unable to get a widget to appear on multiple ‘only’ pages using this method.

    Thanks

  18. Kaspars says:

    Drew, try deselecting ‘Single Page’ option and make the target URL equal to blog if your blog’s URL is domain.com/blog

  19. Rob says:

    Hi, can you please add a feature for this plugin to hide/show a particular widget when a user is logged-in to site and when they are logged-out? This would be extremely useful for membership websites that use WordPress as a backend. Seems like an easy feature to include that would add tremendous value. Let me know. Thanks!

  20. Kaspars says:

    Rob, that is a really good suggestion. I’ll implement that in the next version.

  21. Jay Carlson says:

    Jeffro2pt0,

    I’m getting the same thing. with multiple text widgets, it just shows them all…

    J.

Comments are closed.