One of the most significant features of WordPress is the use of sidebars to supplement the content of a post or page. They are very flexible spaces because you can use a large number of widgets to add different types of dynamic content. Even better, you can add new widgets using plugins.
One of the limitations of WordPress in terms of sidebars is that the same column will always be displayed on all pages. Some themes try to solve this problem by providing different columns according to the page type, but this is not a very flexible technique. Let’s see how to do this without touching a single line of code.
Create multiple sidebars
Using WordPress widgets is very simple.They are managed in sections Apariencia> Gadgets, Where you will find a list of all the sidebars or sidebars provided by the WordPress theme, as well as a large list of widgets that can be placed in these columns. Each widget is designed to display a specific type of content-for example, WordPress comes with widgets by default to display search forms, add custom text, menus and even your latest posts, etc.
Although the WordPress theme you choose only provides a sidebar for all pages and posts, you can use plugins to create as many widget spaces as you need. The plugin in question is WooSidebars, which you can download for free from the official plugin library.
WooSidebars is designed to allow you to create new sidebars with a name and description of your choice, and then selectively assign them to certain types of content on your website. For example, you can create a new sidebar called “blog” and assign it to all the pages of your post. In this way, you can customize the widgets to be displayed on the blog while displaying the usual widgets on the remaining pages.
This plugin gives you a lot of freedom to manage the use of your widgets, but due to its complexity, it can be a bit difficult to manage. Let’s take a closer look.
When installing and activating WooSidebars, you will see a new section in the appearance menu with the name Widget area. Here, you will find a list of sidebars that you can create in the same way you create a website page.
Creating a new sidebar is very simple: you only need to give it a title and a description. I always recommend using a name that can well describe what this column will be used for. You may need to create these types of spaces for very specific purposes, and over time, the Widgets interface can become very confusing.
The most complicated part of this plugin is to indicate where to use the sidebar you created. Just below the description, you will see a series of tabs with various types of content. Initially there is only one named page, but you can activate the remaining pages by clicking the “Advanced” tab on the right. Although there are many ways to include the sidebar on one of the website pages, the tabs you see can be divided into two categories:
Create by content
Woosidebars has two tabs that allow you to include sidebars on certain pages of your website. This means that each of them will display the content you have been creating, and each option will represent a page:
- Number of pages: It allows you to use this bar on specific pages of the site.
- Classification term: It allows you to display sidebars in certain categories, such as category or post tags.
By content type
Another way to allocate space for widgets is based on the type of page to be displayed. These tabs allow you to apply the sidebar to the entire page set based on ranking, rather than referencing a single specific page:
- Page template: It uses this column according to the template used on the page.
- Post type (tipos de post): Specify whether to use this column in a specific type of content. By default WordPress has posts and pages, but many themes include additional post types such as portfolio, events, or recommendations.
- Category archives (archive page): Indicates whether the column will be used for certain types of taxonomy, such as the category or label of an item.
- Template hierarchy: It allows you to use sidebars based on how WordPress ranks pages. For example, a 404 page or a search results page.
Replace the original bar
After selecting the page where you want to display the new column, you must select one of the theme’s sidebars to replace it with options Sidebar to replace Located in the correct area. When a user visits certain pages on your website, this will make the selected column disappear to support the column you created.
With this option, you can choose which areas of the site you want to customize more precisely. Keep in mind that many WordPress themes also include sidebars in the footer, and they work in the same way as the main bar.
Customize your website
WooSidebars is a very useful plug-in for users who want to optimize the content of their website to the greatest extent. Even if your blog pages are very similar, the widgets that are most helpful to you may vary from page to page. For example, you might want to display your most recent posts when users read them, but such widgets are redundant in the main blog list. It is very important to consider the goals of each page of your website, for which you need to have more control over your content.