Add a separate sidebar for the page

Today I found one unique tutorial on how to make several sidebars and assign their contents to separate pages in the form of a drop-down list.. A bit confusing but I think, in practice will be clearer.

Step One Adding Sidebars

Open the function.php file in the theme folder and add the code there to create several sidebars in a loop:

In step two, we add an area to display the sidebar.

I have added this code to the file page.php before posting comments.

Externally, in the widget section, after pasting the code, everything will look like this:

sidebar-bar wordpress

After we insert the widget into one of the areas, you need to go to any page or create a new one and specify it in the drop-down list, what sidebar will be displayed on it.

select-sidebar выбрать какой сайдбар будет отображаться на странице wordpress

Also in the settings menu there will be a new item Sidebar Selection Which one, when not needed, can be turned off.

sidebar-bar-menu - отключить область сайдбара wordpress


Buy WordPress hosting
WordPress tutor
Online tutoring services. List of courses I teach
  • Basic web design course;
  • Site layout;
  • General course on CMS WordPress and continuation of the course on template development;
  • Website development in PHP.
Read more on the page WordPress tutor
*/

Nikolaenko Maxim

Director of web studies ProGrafika. I am developing, website design and promotion. Always glad to new blog readers and good clients.


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Templates for WordPress
The best hosting in Ukraine
Stable hosting for Drupal