Widget Logic is quite a nice plugin that you can use to control where your WordPress widgets appear with WordPress conditional tags. Once you have installed the plugin, all of your widgets will have an extra text field where you can use WordPress conditional tags to control where the widget appears.

Using this plugin with WordPress conditional tags, you can decide what widgets to display on your pages.  If you have an “about us” page, you can display dedicated widgets to that page that will only be displayed on that particular page.

WordPress Conditional Tags

The Conditional Tags can be used in your Template files to change what content is displayed and how that content is displayed on a particular page depending on what conditions that page matches. For example, you might want to display a snippet of text above the series of posts, but only on the main page of your blog. With the is_home() Conditional Tag, that task is made easy.  WordPress Conditional Tags

To use the Widget Logic plugin on your widgets, browse to the widgets section on the WordPress dashboard.  Underneath each widget you will see an additional textbox where you can enter the conditional tags.

If you have a page named ‘about us’ you can use the conditional tag is_page(‘about-us’) on a widget to only appear on that page.  If you have widgets that you don’t want to display on certain pages, use the conditional tag !is_page(‘about-us), which will tell WordPress if it’s not that page, display this widget – change about-us mentioned above to your own page names.  Have a look at all the conditional tags available that you can use.

Common Conditional Tags

  • is_home()
  • is_page()
  • is_front_page()
  • is_single()
  • is_page_template()
  • is_category()
  • is_tag()
  • is_author()

Subscribe To Our Newsletter

Join our mailing list to receive the latest news and updates from our team.

You have Successfully Subscribed!

Pin It on Pinterest

Shares
Share This