Answers for "wp get widgets code"

PHP
0

wp get widgets code

add_action( 'after_setup_theme', 'register_multiple_widget_areas' );

function register_multiple_widget_areas()
{
    register_sidebar(
        array(
        'name'          => 'Sidebar',
        'id'            => 'sidebar',
        'description'   => 'describe the function of the box.'
        )
    );
    register_sidebar(
        array(
        'name'          => 'Header',
        'id'            => 'header-widget',
        'description'   => 'Goes at the top of the page.'
        )
    );
}
Posted by: Guest on July-20-2021

Browse Popular Code Answers by Language