I am trying to register multiple sidebars at once and access theme by different id's just like we are registering multiple menus at once i.e. Main-Menu and Footer-menu.
<?php register_nav_menus(array('primary-menu' => 'Main-Menu','secondary-menu' => 'Footer-menu')); ?>
- How we will do this with sidebars as well.We just write one line code and register multiple sidebars at once.
CodePudding user response:
You need to use the WordPress native function register_sidebars().
You will be able to register multiple sidebars at once as your menus.