Decide Where to Show WordPress Widgets with Dynamic Widgets

| WordPress
Decide Where to Show WordPress Widgets with Dynamic Widgets

This week an OSTraining member had a question: "How do I show a WordPress widget on one page, but disable it on other pages?

Our answer was Dynamic Widgets, a useful plugin that will provide control over where widgets are displayed based on several settings, including pages, URLs, categories, and user roles.

Continue reading this post to discover how easy it is to control your WordPress widgets by using Dynamic Widgets.

Install the Dynamic Widgets plugin

  • Login to your WordPress site.
  • Go to Plugins > Add new and search for "Dynamic Widgets".
  • Click "Install Now" and activate the plugin

wordpress dynamic widgets

Display a widget on specific URLs

In this example, I'm going display a widget on specific URLs, and remove it from any other pages:

  • Go to Appearance > Widgets.
  • Add or edit a widget.
  • Click "Static" next to the Dynamic widgets label.

wordpress dynamic widgets

The next screen will display a list of rules to apply, including URL, Front Page, Pages and more.

  • Click the "URL" slider.
  • In Show widget at this URL? select "No".
  • In Except the URLs, type the relative URLs to the pages where you only want to display this widget. Don't incude your domain name.

In my example, I only want to enable the "Calendar" widget on /blog/ and /about/ URLs.wordpress dynamic widgets

  • Click "Save" when you're done.
  • Check the widget indeed is working as expected.

Display a widget on specific Pages

Now let's see another example. This time, our widget will only show on some page that we choose.

  • Edit a widget.
  • Click "Static" next to the Dynamic widgets label.
  • Click the "Pages" slider.
  • In Show widget default on static pages? select "No".
  • In Except the page(s), choose the pages where you need the widget.

wordpress dynamic widgets

Display a widget on specific single posts in a category

Here's what to do if you need to display a widget only on single posts from a category or categories:

  • Edit the widget.
  • Click "Static" next to the Dynamic widgets label.
  • Click the "Single posts" slider.
  • In Show widget default on single posts? select "No".
  • In Except the categories, check the categories where you want to display the widget.

wordpress dynamic widgets

Display a widget based on more features

The Dynamic Widgets plugin has a lot of more features to configure where to enable a widget. You can also display by role, date, days, weeks, browser, IP Address and more.

wordpress dynamic widgets

In my example, I only want to enable the "Calendar" widget on /blog/ and /about/ URLs.

About the author

Valentín creates beautiful designs from amongst the tequila plants of Jalisco, Mexico. You can see Valentín's design work all over this site and you can often find him helping members in support.