How to get sidebar id or name
-
I cannot tell from the one php file — simple-page-sidebars.php how the custom sidebars are registered; by name or ID? Other than the IDs would begin with ’20’ — add_action( ‘widgets_init’, array( __CLASS__, ‘register_sidebars’ ), 20 );
with this line of code — I can only assume they are registered by ID. Nonetheless, where may I find the IDs for the custom sidebars I create using the plugin?
I have named a custom sidebar “Workshops”. If I want to access this specific sidebar using say: dynamic_sidebar( ‘?’ ) and the wordpress rule is: “If your sidebars were registered by number, they should be retrieved by number. If they had names when you registered them, use their names to retrieve them.”
- The topic ‘How to get sidebar id or name’ is closed to new replies.