Created
November 26, 2016 07:12
-
-
Save sudipbd/09f7ddeea4f1c84f6e067a480d4deed2 to your computer and use it in GitHub Desktop.
WordPress registering a sidebar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function desh_widgets_init() { | |
register_sidebar( array( | |
'name' => __( 'Sidebar', 'twentysixteen' ), | |
'id' => 'blogroll', | |
'description' => __( 'Add widgets here to appear in your sidebar.', 'twentysixteen' ), | |
'before_widget' => '<div id="%1$s" class="widget %2$s">', | |
'after_widget' => '</div>', | |
'before_title' => '<h5>', | |
'after_title' => '</h5>', | |
) ); | |
} | |
add_action( 'widgets_init', 'desh_widgets_init' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment