How to Use Widget Options for WordPress

Using the Widget Logic plugin for WordPress is a good way to customize when or where a Widget should appear. But Widget Logic might be too complicated for the average user. You are required to know a bit of PHP Logic and WordPress Conditional Tags. See Tutorial: How to Use Widget Logic for WordPress

But if an average user only wants to have certain Widgets appear on the Front Page or on Single Posts, a condition that is relatively simple, then there might be a better solution. Widget Options is a WordPress plugin similar to Widget Logic but is much more user friendly, especially for a beginner.

The WordPress Conditional Tags you would normally use on Widget Logic has been converted to simple check boxes as seen on the image below.

Widget Visibility Options
Click to Expand Image

Widget Options Usage

  1. First, choose through the drop-down option whether to Show or Hide the widget on the check boxes that are to be selected.
  2. Select the Check Boxes of your choice.
    • The Misc tab shows the usual templates. Whether to show on the Front Page, Single Pages, Search Results, etc.
    • The Post Types tab is where you can choose whether to show on Post types or Page types or Both. It also lists all of your sites Pages to allow for the selection of specific Pages.
    • The Taxonomy tab shows the Categories and Tags.
  3. Save.

Another useful feature of the Widget Options plugin is the ability to change the ID and/or add Classes to a specific widget. This can be used when you want to style a specific widget with your custom css.

You no longer need to find out the Widget ID through searching the View Source or using a Developer Tool because you can add your own ID to target the widget. In the example below I’ve added a Class to a Text Widget (my-sidebar-ad-1) so I can apply some style to that specific Widget.

Custom ID Classes for Widgets
Click to Expand Image
.my-sidebar-ad-1 {
   background-color: #2233FF;
   text-align: center;
}

Leave a Reply

Please write your comments in english. I delete anything that even remotely resembles spam.

Note: When posting code, enclose it in pre and code tags.
e.g. <pre><code> Add code here </code></pre>