How to set a wordpress widget to appear on one or some pages – NOT ALL!!!



1st, to set logical attributes for wordpress widgets, you need to be using the open source .org version and hosting it on your own site (www.yoursite.com).  If you are hosting on here (yoursite.wordpress.com), you cannot set the widget instances.

Next you need to either feel comfortable using and editing PHP files, or you need to download this plugin: http://wordpress.org/extend/plugins/widget-logic/, (RECOMMENDED) which allows you to set conditional tags via the control panel with all your installed widgets.

Each widget is different, but you’ll need to go to that specific active widget, edit the code to set the attributes or use the plugin (RECOMMENDED) which will allow you to change where your widgets are displayed.  Examples Instances:

Display it on the home page only: is_home()’
Display it on individual posts: is_single()’
Display only on pages: is_page()’
Display on archived pages (category, tag, etc.): is_archive()
Display on search results pages: is_search()
Display on all pages except the home page: !is_home()
Display on “this” or “that” page: is_page(‘this’) || is_page(‘that’)

More than one page, you can seperate by commas: is_page(‘this’,'that’)

By default, the wordpress widgets will install on all pages so no need to add instance tags to the code if that’s what you want.

Simple as that!  Enjoy

Need help with your WordPress site?
Inforats WordPress Support

Speak Your Mind

*