Last active
December 15, 2015 15:08
-
-
Save leowebguy/18c87fa496a1a6fd8eda to your computer and use it in GitHub Desktop.
WordPress register custom Widget
This file contains 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 custom_widget_init() { | |
register_sidebar( array( | |
'name' => 'Featured + Search', | |
'id' => 'featured_search1', | |
'before_widget' => '<div>', | |
'after_widget' => '</div>', | |
'before_title' => '<h2 class="featured_search1">', | |
'after_title' => '</h2>', | |
) ); | |
register_sidebar( array( | |
'name' => 'Just Search', | |
'id' => 'featured_search2', | |
'before_widget' => '<div>', | |
'after_widget' => '</div>', | |
'before_title' => '<h2 class="featured_search2">', | |
'after_title' => '</h2>', | |
) ); | |
register_sidebar( array( | |
'name' => 'Just Featured', | |
'id' => 'featured_search3', | |
'before_widget' => '<div>', | |
'after_widget' => '</div>', | |
'before_title' => '<h2 class="featured_search3">', | |
'after_title' => '</h2>', | |
) ); | |
} | |
add_action( 'widgets_init', 'custom_widget_init' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment