How to add another sidebar to the twenty ten theme – the styling???
-
Hi
I’ve read the post about adding another sidebar to twenty ten theme where Mattsay wrote:
Yes it is possible. Just add this code to your functions.php file and it will add the sidebar to your theme:
function add_my_sidebars(){
register_sidebar( array(
‘name’ => ‘My sidebar’,
‘id’ => ‘my-sidebar’,
‘description’ => ‘Just a little description’,
‘before_widget’ => ‘<div id=”%1$s” class=”widget-container %2$s”>’,
‘after_widget’ => ‘</div>’,
‘before_title’ => ‘<h3 class=”widget-title”>’,
‘after_title’ => ‘</h3>’,
) );
} add_action(‘widgets_init’, ‘add_my_sidebars’);Then add this simple code to your theme template (eg. sidebar.php) :
<?php dynamic_sidebar(‘my-sidebar’); ?>
ID values should match.
I have added this to my page https://genanvendt.dk/ and the sidebar is there, but not in the right side where I want it. Probably because I haven’t added the css/styling for this new sidebar. Does anyone know how to do this correctly?
Thanks
- The topic ‘How to add another sidebar to the twenty ten theme – the styling???’ is closed to new replies.