Adding a sidebar to the Appliance theme
-
Hi,
I have followed some instructions on how to add a sidebar from a couple of sources, but I cannot get it to work.
In the functions.php file I added the following:
'register_sidebar(array( 'name' => __('Right Sidebar', 'appliance'), 'id' => 'right-sidebar', 'description' => __('Appears as the sidebar on the custom homepage', 'appliance'), 'before_widget' => '', 'after_widget' => '</div>', 'before_title' => '<h2>', 'after_title' => '</h2><div class="content">', ));' I then added a file called sidebar-right.php containing the following code: '<div id="sidebar"> <ul> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('right-sidebar') ) : endif; ?> </ul> </div>' Finally I edited the page.php file and added the following code: '<?php if(is_active_sidebar('right-sidebar')) : ?> <div id="sidebar"> <ul> <?php dynamic_sidebar('right-sidebar'); ?> </ul> </div> <?php endif; ?>'
When I add widgets to the sidebar nothing displays.
Can anyone tell me where I’m going wrong please?
Thanks,
Lindsay`
- The topic ‘Adding a sidebar to the Appliance theme’ is closed to new replies.