Do you want to display your widgets only on certain pages? Widgets are powerful tools that allow you to customize certain areas of your website. They are most commonly used to add functionality to the sidebar and footer areas. Widgets are an essential part of making your website unique. There are millions of websites, but only thousands of themes.
It should be a simple conclusion that there will be multiple websites that use the same theme. To make your website stand out, it is important to fully customize your theme and widgets help you do that. Of course, widgets are not appropriate on every page and sometimes it is better to hide them. Today, I will demonstrate how to display widgets on certain WordPress pages using the Widget Context plugin.
Why You Should Not Display Widgets on Every Page
When most people think about widgets they imagine the sidebar widget area. The sidebar is a great way to include search bars, new articles, deals, ads, etc., but sometimes that kind of stuff does not benefit a page. For example, dedicated login or logout pages do. It is very common to have a login or log out feature on the sidebar, but do you need a login widget on the login page? This is redundant because the page is already about logging in or logging out.
There are plenty of examples of certain widgets not being needed on certain pages. Another popular example is the website’s homepage. Generally, a website will list the newest and most popular content, but that is also common on a sidebar. The point is there is a time and place for every widget and sometimes a page is better off when a widget does not appear on it.
How to Display Widgets on Certain WordPress Pages
Today, I will demonstrate how to display widgets on certain WordPress pages using the Widget Context plugin. This plugin is extremely easy to understand. You click on specific widgets and choose what pages they are allowed to be displayed on. They will automatically not work on the pages you choose for them not to work on. This plugin will work on any widget, even if it is added by another plugin.
Installing Widget Context
Begin by clicking on Plugins and selecting the Add New option on the left-hand admin panel.
Search for Widget Context in the available search box. This will pull up additional plugins that you may find helpful.
Scroll down until you find the Widget Context plugin and click the «Install Now» button and activate the plugin for use.
On the left-hand admin panel click on Appearance and select the Widgets option. This will pull up the widgets page.
Setting Up Widget Context
Click on any active widget in your widgets area. At the bottom of the widgets setting, you will see the Widget Context section. It contains one drop down option that is set to «Show widget everywhere» and can be changed. The «Show widget on selected» will allow you to choose the pages that it is displayed on, while the «Hide widget on selected» chooses the pages that it is hidden on. The final option is to «Hide widget everywhere», which does as the name implies.
I recommend using the «Hide widget on selected» option. In most cases, it is much easier to choose which pages the widget will not appear on. This is because there will only be a handful of pages that a widget needs to be hidden on. Of course, if you find the opposite to be true then select the «Show widget on selected» option.
Once, you have chosen which option to use, more settings will appear. If you picked the «Hide widget on selected» you will now be given the option to select where it will not appear. Select the pages that you would like the widget not to be visible on. Click on the «Save» button when you are done.
Congratulations, you can now view that a widget is not visible on your selected page or the opposite, depending on your choice. You can change this setting and what pages a widget is seen on at any time.
Show What You Need to Show
A very famous saying is «Less is more» and that is especially true for websites. Pages full of content sound like a great idea, but are usually poorly implemented. These pages are usually referred to as «busy pages» and are so full of content, that they are hard to follow. It is better to have less content on a page because it is easier for visitors to follow and absorb the content.
Widgets can also clutter pages and sometimes they are the biggest culprits on busy pages. In some cases, more content has been placed on sidebars than the actual page. You may have run into a website that has a small article and the sidebars end up longer than the article. This should be avoided. Only show what you need to show.
Which option have you chosen for the Widget Context plugin? How many widgets have you decided to display or hide on your website?
Author: Chris Racicot
Chris is the Support Manager at GreenGeeks and has been with the company since 2010. He has a passion for gaming, scripting and WordPress. When he’s not enjoying his sleep, he’s working on his guitar skills and fiddling with 3d printing.