Created
April 1, 2015 09:41
-
-
Save romuloctba/e84fa131b2b79e1d24ca to your computer and use it in GitHub Desktop.
Create sidebar/widget area in WordPress
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
function criaSidebars() { | |
register_sidebar( array( | |
'name' => 'Sidebar Principal', | |
'id' => 'main-sidebar', | |
'before_widget' => '<div>', | |
'after_widget' => '</div>', | |
'before_title' => '<h2 class="">', | |
'after_title' => '</h2>', | |
) ); | |
} | |
add_action( 'widgets_init', 'criaSidebars' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment