Add more widget areas to a theme

what’s the best approach to add more widget areas to a theme? currently, my theme has 2 columns that display the widgets, but I’d like to extend it to 4 for example.

It currently looks like this:
enter image description here

Read More

And I’d like it to look like this:
enter image description here

All the widgets of this theme are located above the footer. The theme is called Time by s5themes.com. The widget initializer is not located in the functions.php as far as I know. Is this a simple fix at all? thanks!

Edit: Now that the sidebar is displaying in the theme, I think the rest of how each sidebar is shown is located in the style.css. Thanks.

Related posts

1 comment

  1. You have to add this code in the functions.php file:

    /**
     * Register new sidebar
     *
     */
    function new_sidebar_widget_init() {
    
    register_sidebar( array(
        'name' => 'new-sidebar',
        'id' => 'new-sidebar',
        'before_widget' => '<div id="new-sidebar">',
        'after_widget' => '</div>',
        'before_title' => '',
        'after_title' => '',
    ) );
    }
    add_action( 'widgets_init', 'new_sidebar_widget_init' );
    

    and then call the sidebar from a template to display it:

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

Comments are closed.