add second sidebar in twenty thirteen wordpress theme

All wp developers and wordpress theme developers know about twenty thirteen wordpress theme. I do not need to talk about this more. Many people discussed about it issues and features. Many people are developed child themes based on twenty thirteen wp theme.

Some people asked me, how to add second sidebar in twenty thirteen wordpress theme. We can very easily add the second sidebar to it’s child theme.

add second sidebar in twenty thirteen wordpress theme

Using following simple code you can add the second sidebar to twenty thirteen wordpress child theme. If you are creating the child theme of twenty thirteen then you just need to add the following code into your functions.php file and that sit.

[viral-lock message=”Solution code is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]


function second_sidebar() {
register_sidebar( array(
'name'          => __( 'Second Widget Area', 'twentythirteen' ),
'id'            => 'sidebar-3',
'description'   => __( 'Appears on posts and pages in the sidebar.', 'twentythirteen' ),
'before_widget' => '<aside id="%1$s">',
'after_widget'&nbsp; => '</aside>',
'before_title'&nbsp; => '<h3>',
'after_title'&nbsp;&nbsp; => '</h3>',
) );
<?php dynamic_sidebar( 'sidebar-3' ); ?>
}
add_action( 'widgets_init', 'second_sidebar' );

[/viral-lock]

Above code will add the second sidebar to your child theme. using following code you can add the second sidebar to your child theme.


<?php dynamic_sidebar( 'sidebar-3' ); ?>

you just need to place above code into your single.php and index.php file or you can add above code where you need to show the second sidebar in your child theme.

Based on child theme code you need to do some CSS changes so your second sidebar will look perfect. I suggest to use the any grid system wordpress framework or you can use bootstrap CSS grid system for fuild HTML framework.

How to add second sidebar in twenty thirteen wordpress theme

How to add second sidebar in twenty thirteen wordpress theme

Add a Comment

Your email address will not be published. Required fields are marked *