How to Create a WordPress Custom Sidebar

How to Create a WordPress Custom Sidebar

The sidebar is a great location for any kind of website. It is fixed on all your webpages and can be a good option for the display of your advertisements, the latest updates, the hot comments, the editorial picks and many more. This is the main reason as why many webmasters view the sidebar optimization as a crucial step for website improvement.

Now, we’d like to introduce another sidebar related tip – create the custom sidebar. This way, you can show different sidebar contents for different posts, pages, categories, readers and many more. We have listed some typical situations that you’d better create and utilize the custom sidebar.

  • You can share different promotional offers and marketing links on the sidebar for the common visitors and your logged-in users.
  • You can showcase different lists of hot articles on the sidebar for different content categories.
  • If you run an online store, you can show different featured products for each product group on the sidebar.
  • You can choose to showcase the advertisements for those who fail to log into your site.
  • You can showcase a specific sidebar for all the posts and pages that belong to the pre-defined category, archive and post type.

Here, you can check the following part to know how to create a WordPress custom sidebar easily.

Utilize the Custom Sidebars Plugin

The Custom Sidebars plugin is the top recommendation for the easy and effortless creation of the custom sidebar. With it, you can freely decide the content of the sidebar for the individual post, page, category, archive, reader and post type. In addition, as this plugin can achieve the seamless integration with your widget menu, it will not slow down your website performing and can work well with all the quality themes. Also, the number of custom sidebars created by this plugin can be unlimited.

Now, you simply need to install this easy and light-weight tool. Note that there are no additional settings required to configure. You can directly click the Appearance > Widgets button.

Here, you can check two columns. One is the Custom Sidebars and another is the Theme Sidebars.

Two Columns for Sidebar

Note that the Theme Sidebars section lists the default sidebar that is pre-configured by your current template. In order to ensure that you can replace it with your custom sidebar, you must make sure that the checkbox that allows this built-in sidebar to be replaced is already ticked.

Next, you can click the Create A New Sidebar button. Here, you should give it a name and enter some descriptive words if you want. The sidebar name should be unique so that you can pick up it easily and precisely among all your available custom sidebars.

In addition, there is an advanced option that allows you to enter some properties for defining the HTML code that is used to wrap the sidebar widgets. Personally speaking, unless you are a developer and you know what you are doing, you’d better pass this advanced step. After all, if you do something wrong, the overall design of your website might be broken.

Now, you can hit the Create Sidebar button.

Create Sidebar

As the custom sidebar is generated automatically, the next step is to drag and drop your wanted widgets into it. In addition, you also need to decide the exact place where you want this special sidebar to be showcased.

Display the Custom Sidebar on Some Unique Pages and Posts

It is possible that you want to display the sidebar on the unique page or post. If so, you can open the editing screen of it. Here, you can find a new meta box in the right-hand section that is named as Sidebars. From this box, you can replace the default WordPress sidebar with your custom one. To do this, you simply need to choose the sidebar you want to display from the drop-down list, and then, update or publish the post.

Replace Sidebar

Display the Custom Sidebar based on the Matching Criteria

In addition to the specific webpages or blog posts, you may also want to showcase the custom sidebar based on some specific requirements. For this, you should enter the Widgets page again and target your sidebar to click the Sidebar Location button.

Here, you can prompt the replacements once the single page can match the pre-defined post categories and post types. Note that each sidebar can be applied to multiple categories and post types.

Sidebar Location

In addition, this kind of automatic replacement for the sidebar can also be applied to your website archives. For instance, you can choose the archive types of front page, tag archives, date archives, author archives and many more. Also, if you want, you can even pick up some category archives based on your needs.

Archives Replacement

After setting up the proper options, you can click the Save Changes button and your custom sidebar will be displayed automatically in the way you prefer.