How to Display Different Sidebars/Widgets in Different Places(posts, pages) on WordPress?

  • Post category:Plugins
  • Post author:
  • Post last modified:October 6, 2020
  • Reading time:3 min(s) read

Normally every WordPress theme has the option to display the same sidebar everywhere on the site. Some of the themes give you to create separate sidebars for posts or pages. But, in this, you can display the same sidebar/widget for every post.

If you need to display different sidebars/widgets on different posts, pages, or categories you can do this. You just need to install a free plugin to perform this. The plugin Custom Sidebars – by WPMU DEV will give you the freedom to display separate sidebars/widgets wherever you want.

Also, you can display the custom sidebars for specific posts only.

Let us see the process to display different sidebars/widgets in different places on the WordPress website.

Create custom sidebars

First, install the plugin Custom Sidebars – by WPMU DEV and activate it. This plugin is completely free.

Custom Sidebar plugin by WPMUDEV

Now open the Widget section (Appearance -> Widgets) on the website. You can see the Custom Sidebars option is available here. First, you need to create a custom sidebar to get started.

Create custom sidebars on WordPress

Give the sidebar a name and write a description for the sidebar, this is for your understanding use only.

Create new custom sidebar on WordPress

After creating the sidebar add the widgets you want to display. Add the widgets normally like you add widgets on the default sidebar.

Display Custom sidebar for posts

Now, you need to assign the location for the sidebar where you want to display the sidebar. Click on the Sidebar Location option.

Custom sidebar location setup

On the sidebar location settings, you will get the options to display the sidebar on different locations. Like you can assign the sidebar on posts, pages and categories.

Select the options from the available list. Like on the below screenshot I have assigned the sidebar for all the posts, this will be applied to the posts only. On the other locations, the default sidebar by the theme will be displayed.

You can also select the sidebar for different categories from the option.

Display custom sidebar on posts on WordPress

Display sidebar for individual post

You may need to display the sidebar for some posts only. This also can be done with this Custom Sidebar plugin.

After creating the sidebar go to the All Posts section. Select the Quick Edit option under the posts and you will find an option to select the sidebar for that posts. Select your created sidebar and update the post.

Display custom sidebar for individual post

Hide sidebars/widgets on small screens

On small devices, sidebars widgets display at the bottom of the screen. And, most of the people do not scroll to the bottom to see widgets after reading the posts, and it also slows down the loading time.

To avoid the slow loading speed you can hide the widgets on small devices.

Go to sidebar location settings on the specific sidebar. You will see an option For Screen Sizes. Set a rule to hide the widgets on specific screen sizes.

Hide sidebars-widgets on small devices

RELATED GUIDES:

Leave a Reply