Paste following code in the functions.php file and it will add Custom Sidebar widget area in WordPress widgets page.
register_sidebar(
array(
'name' => __( 'Custom Sidebar', 'textdomain' ),
'id' => 'custom-sidebar',
'description' => __( 'Custom Sidebar widget area', 'textdomain' ),
'before_widget' => '<div id="%1$s" class="custom-widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
)
);
Now paste following tiny code snippet in the template where you want to show widgets from this newly created widget area.
dynamic_sidebar('custom-sidebar');
Need Professional Support for Your Website Problems?
Whether you're facing website issues or struggling with code implementation, our team is here to assist. Hire us to get your website back on track.
Hire Us