Change sidebar for custom template
-
I have managed to change my functions.php file to allow me to create multiple sidebars/etc. with widgets here is a small sampling…
<?php if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Sidebar 1', 'before_widget' => '<div id="widget-%1$s" class="sidebar-box %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>', )); register_sidebar(array( 'name' => 'Sidebar 2', 'before_widget' => '<div id="widget-%1$s" class="sidebar-box %2$s">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3>', ));
I have also managed to create an about.php template. Now to swap sidebars on this page, I thought it would be as simple as swapping out this line…
<?php include ('sidebar 2.php'); ?>
with
<?php get_sidebar(); ?>
However, that continually returns an error. So I am evidently missing something. Any thoughts?
Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Change sidebar for custom template’ is closed to new replies.