Here’s a very hand little plugin for you, it’s called widget logic http://wordpress.org/extend/plugins/widget-logic/ and it lets you control where or when a particular sidebar widget is displayed by adding some conditional logic to the widget config.
WTF Give me Some Examples
It’s probably easier to use examples to explain what the plugin can do:
- You may only want an email sign up widget to appear on the home page
- You may only want your twitter link to display on a blog post not a page
- You may want your categories widgets to appear on your contact page (running out of examples already)
WordPress Conditional Logic
Sorry but this plugin requires a little understanding of WordPress conditional logic to work, but once you have mastered that you can control which widgets appear where. Full details of WordPress conditional logic can be seen using the following links
http://codex.wordpress.org/Conditional_Tags
Some Examples
Here are some examples of the logic in action
- is_home() – this will check for the home page
- is_page(‘contact’) – check for the page called contact
- is_sigle() – this will check for an individual blog post
Hello Operator
There are a number of operators available in WordPress so you can join logical statements to create more complex tests, here are some example operators.
- && – and
- || – or
- ! – not
So you could say I want to display a widget on the home page or the contact page, the statement would look like this
is_home() || is_page(‘contact’)
Installation & configuration
The plugin is install as any other plugin, once activated a new form field is added to the bottom of your sidebar widgets.
Compose a logical statement and add it to the widget logic form field and you will only see that widget when the conditions are met.
Wrap Up
Widget logic is an excellent plugin to help control where widgets are displayed, if you are using WordPress as a CMS, and not a blogging platform this is an excellent tool to add to your toolbox.
If you need help building your logical statement you know which link to follow hint this one https://neilmatthews.com/wordpress-technical-support