Adding a new widget area to the left side of the twenty thirteen theme
-
Hello,
So I am trying to create a real estate website and I want to add a new widget area to the left side of the screen, i have created a child theme and have registered a new widget area using this piece of code in the functions.php.
register_sidebar( array( 'name' => __( 'Left Widget Area', 'twentythirteen' ), 'id' => 'sidebar-3', 'description' => __( 'Appears on left side of page.', 'twentythirteen' ), 'before_widget' => '<aside id="%1$s" class="widget %2$s">', 'after_widget' => '</aside>', 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>', ) );
I also added this piece of code to a new sidebar.php template.
<?php /** * The sidebar containing the third widget area * * Displays on posts and pages. * * If no active widgets are in this sidebar, hide it completely. * * @package WordPress * @subpackage Twenty_Thirteen * @since Twenty Thirteen 1.0 */ if ( is_active_sidebar( 'sidebar-3' ) ) : ?> <div id="tertiary" class="sidebar-container" role="complementary"> <div class="sidebar-inner"> <div class="widget-area"> <?php dynamic_sidebar( 'sidebar-3' ); ?> </div><!-- .widget-area --> </div><!-- .sidebar-inner --> </div><!-- #tertiary --> <?php endif; ?>
However all this does is replace the existing widget areas, so my main and second sidebar disappears in the dashboard. I can’t seem to find where i can position my third widget area.
link to my site :My Website
I have looked at other posts but they don’t show you how they have done it.
link: Forum post
Am i on the right track or is there something I am missing, can someone help me?
- The topic ‘Adding a new widget area to the left side of the twenty thirteen theme’ is closed to new replies.