An easy way to customise a WordPress website is to have a number of widget areas defined, and be able to drop widgets at will into those areas.
What gives even more flexibility however is the ability to select whether widgets show or not on a per page or per post basis. To get this functionality, we have to rely on plugins, so we’ll take a look at some of the best ones.
Widget Logic
This plugin gives every widget an extra control field called “Widget logic” that lets you control the pages that the widget will appear on. The text field lets you use WP’sΒ Conditional Tags, or any general PHP code.
Widget Ninja
A very user friendly widget plugin, probably has the best interface of all the widget control plugins out there.
- eliminate the need for multiple sidebars
- create complex logical statements with conditional tags to control widgetβs visibility
- 25 conditional tags, 11 with additional options
- or, and, not logical operators
- works with any custom or built-in widget
- no code editing
- intuitive and simple drag-n-drop GUI
- extensive in-line help
- has much more options and itβs easier to use than Widget Logic
Download Widget Ninja
Sidebar and Widget Manager
- Custom page layoutsΒ β widgetize a page, drop widgets in page content area
- EasyΒ column interface for Widgetizing PagesΒ βΒ Check it out
- Vertical or Horizontal widgets alignment
- Replace any theme sidebarΒ with a custom one on any set of pages
- UnlimitedΒ custom sidebars
- Widget visibilityΒ β display any widget on or hide it from any page
- Supports any kind of contentΒ Pages, Page templates, Posts, Categories, Tags, Archives, Custom post types, Taxonomies, Post type archives, WordPress service pages β home, front, 404, search, etc.
- Optimized performance for large WP installations
- Designed to fitΒ into the core WordPress design
- Easy and intuitiveΒ administration
- No codingΒ required
Download Sidebar and Widget Manager
Custom Widget Areas for WordPress
Have you ever wanted to show different Widgets on Pages or Posts or even inside your content?
With the plugin you can create anΒ unlimited number of SidebarsΒ (Custom Widget Areas) and easily configure them by adding widgets in already familiar WordPress interface. You can assign the Custom Widget Areas to any of your themes defined βwidget areasβ. You can even place them directly inside the content of Pages and Posts by simply using Shortcodes. We have also added support for Custom Post Types and Custom Taxonomies.
The plugin recognizes your themes default sidebars and allows you to replace them, as well as allowing you to set individual sidebars for basically any template in WordPress: Pages, Posts, Custom Post Types, Custom Taxonomies, Categories, Archives, 404 Page, Search Page, Attachment Page, Tag Page and Author Page.
Download Custom Widget Areas for WordPress
Per Page Widgets
Control widget areas on a per-page / per-post basis.
Gives you the ability to show or hide individual widget areas on each page / post as well as completely substituting the widgets shown in a specific widget area on a specific page or post.
Widget Context
Widget Context allows you to specify widget visibility settings. It’s similar to Widget Logic but simpler, I would suggest trying this first before going for Widget Logic.
Per Page Sidebars
This plugin allows the creation and display of custom sidebars for any page (or post) on your site. On each page, you can choose which of your current theme’s sidebars will be replaced. The replacement works for all descendants of a replaced page.
In this fashion you can: 1. Easily create a CMS like site with unique sidebars for every page, even if your theme doesn’t support it. 2. Create a sidebar with a Cart widget that displays on store pages created by the WP-E-Commerce page, but not anywhere else on the site. 3. Use parent pages to create themed areas of your site, without creating custom page templates.
This plugin is compatible with every theme and all widgets because it hijacks your theme’s sidebars instead of replacing them.
If you enjoyed this post, make sure to subscribe to WP Mayor’s RSS feed.
4 Responses
There appears to be conditional widget logic without the need for a plugin, but I can’t get it to work with “tags”. I add a Text Widget, but I only want it to display in the sidebar when specific posts are displayed. I create a tag named “literature”. I add that tag to the posts for my book reviews.
When I click Visibility when creating the Text widget, I select “Show” if “Tag” is “literature”. But when I display one of the book review posts that has that tag, the widget does not appear in the sidebar. If I specify “Show” if “Category” and select a specific Category I have created, this will work if I have selected that specific category. But the book reviews are in a sub-category and I don’t want to have to add conditions for each book review post I have. That is why I want to assign the same “tag” to each book review, and then conditionally display the widget only if the tag matches.
Any suggestions?
This is a great tutorial, im searing some widgets for my sites brightverge.com and gocime.com but still unable to search, manually I am creating but every time I edit my theme functions file I end up with an error message. I have double-checked it against what you put up above and canβt seem to resolve it.
Hello, the point here is if you need to edit a theme that have to be delivered to some other website; it is impossible to keep all of the plugin dependencies the path you show for working with widget does not work in my case. Sorry.
Great. I’m developing at a project which matches perfectly to this article.