Display Widgets Using Conditional Tags

Personally, i use the Genesis Simple Sidebars plugin for displaying different sidebar content on specific pages, posts category archives and custom posts types like portfolio pages.

If you’re not using a Genesis child theme, i’ve also written about the most popular plugin for creating custom sidebars which works on any theme.

You can get even more specific and install the Widget Logic plugin which enables you to display specific widgets on specific pages, posts and archive pages etc, using conditional tags.

Conditional tags enable you to display anything based on any conditions so they’re far more powerful than custom sidebars.

Once you install the plugin, you’ll find all your widgets now include a field for conditional tags.

widget logic - Enter Condtional Tag

Conditional Tags In Widgets

All you need to do is enter a conditional tag into the Widget Logic Field.

Visit the WordPress.org Codex to learn more about conditional tags and view a full list of all tags.

Examples:

Display category widget on category archive pages only.

Conditional Tags in WidgetsDisplay custom menu on specific page.

Display Widget Specific Page

Display list of links on the home page only.

Display Widget Home Page Only

Widget Logic Options

You can also import and export your widget logic settings which include your conditional tags.

save widget logic options

Displaying widgets using conditional tags is the most powerful way to customize exactly where you want your widget content to output.

The Widget Logic plugin provides one of the easiest way to use conditional tags in WordPress.

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.