Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'widgets_init', 'create_new_widget' );
- function create_new_widget()
- {
- register_sidebar( array(
- 'name' => __( 'Custom Sidebar', 'theme-slug' ),
- 'id' => 'custom_sidebar',
- 'description' => __( 'Your widget description here', 'theme-slug' ),
- ) );
- }
- After that you can call this sidebar by following code. Wherever you want add the following code in that particular place.
- dynamic_sidebar( 'left-sidebar' );
Add Comment
Please, Sign In to add comment