Do you want to display different sidebars for different posts and pages on your WordPress site? Typically, WordPress themes show the same sidebars on fixed locations regardless of which post or page you’re on. In this article, we will show you how to create and display different sidebars for each post and pages in WordPress.
When Would You Need Different Sidebars in WordPress?
By default, sidebars are defined by your WordPress theme. Each WordPress theme comes with a few sidebars or widget ready areas that allow you to add widgets.
Typically a sidebar on the blog is displayed throughout your site on all posts, pages, categories, and archive pages. However, sometimes you may want your sidebar content to change based on specific posts or pages.
For example, you can show different featured content in the sidebar of your most popular posts, add different email signup forms, or display ads.
Having said that, let’s see how to create and display different sidebar for each post and page in WordPress.
Displaying Different Sidebars for Each Post and Page in WordPress
First thing you need to do is install and activate the Easy Custom Sidebars plugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon activation, you need to visit the Appearance » Theme Sidebars page to create custom sidebars.
First you need to provide a name for your custom sidebar and then click on the create sidebar button.
The plugin will now create your sidebar, and you will be able to select the sidebar properties.
After that you need to select which theme sidebar will be replaced by your custom sidebar and provide a description for it.
Next, you need to select where you want your custom sidebar to replace the theme sidebar. You will see your posts, pages, categories and tags listed in the left column of the screen.
Simply select the areas where you want custom sidebar to be displayed and then click on ‘Add to sidebar’ button.
You will notice your selected items appear under the custom sidebar settings. Don’t forget to click on the save button to store your sidebar settings.
Easy Custom Sidebar allows you to create as many custom sidebars as you like and assign each sidebar to different pages on your WordPress site.
Adding Widgets to Your Custom Sidebars
Once you have created custom sidebars and assigned them to different areas of your website, it’s time to add widgets to your sidebars.
Head over to the Appearance » Widgets page. You will notice your newly created custom sidebars among your theme’s default sidebars.
You can go ahead and add widgets to your custom sidebars. The plugin will now show the sidebars based on your settings. You can visit your selected pages to see it in action.
We hope this article helped you learn how to add different sidebars to each post or page in WordPress. You may also want to see our these WordPress sidebar tricks to get maximum results.
The post How to Display Different Sidebar for Each Post and Page in WordPress appeared first on WPBeginner.
source http://www.wpbeginner.com/wp-themes/display-different-sidebar-for-each-post-and-page-for-wordpress/
No comments:
Post a Comment