Adding a custom sidebar
-
I trying to add a custom sidebar by following the instructions here. I added the following to my functions.php of my child theme:
if ( function_exists ('register_sidebar')) { register_sidebar ('custom'); }
Then I created a sidebar-custom.php
<?php /** * The custom sidebar. * * @package agua_dulce-first-child */ if ( ! is_active_sidebar( 'sidebar-custom' ) ) { return; } ?> <div id="secondary" class="sidebar-area" role="complementary"> <div class="widget-area"> <?php dynamic_sidebar( 'sidebar-custom' ); ?> </div> </div><!-- #secondary --> ?>
The sidebar does not show in Appearance/Widgets
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Adding a custom sidebar’ is closed to new replies.