Decide Where to Show WordPress Widgets with Dynamic Widgets

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.

Instructor

  • Valentin discovered Joomla in 2010, and since then he has considered it as the best CMS. Valentin has been coding extensions and templates for Joomla for many years and truly enjoys helping people build their own websites with Open Source tools. He lives in San Julián, Jalisco, México.

0 0 votes
Blog Rating
Subscribe
Notify of
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
pepperstreet

Looking-glass world? Funny, a WP plugin that mimics a Joomla core feature. 😉

1
0
Would love your thoughts, please comment.x
()
x