Created
April 18, 2017 21:20
-
-
Save braginteractive/47f4efa563984916abd9535536125f69 to your computer and use it in GitHub Desktop.
Resister the Contact widget area in WordPress theme
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 | |
/** | |
* Register widget area. | |
* | |
* @link https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar | |
*/ | |
function helpwp_widgets_init() { | |
register_sidebar( array( | |
'name' => esc_html__( 'Sidebar', 'helpwp' ), | |
'id' => 'sidebar-1', | |
'description' => esc_html__( 'Add widgets here.', 'helpwp' ), | |
'before_widget' => '<section id="%1$s" class="widget %2$s">', | |
'after_widget' => '</section>', | |
'before_title' => '<h4 class="widget-title">', | |
'after_title' => '</h4>', | |
) ); | |
register_sidebar( array( | |
'name' => esc_html__( 'Contact', 'helpwp' ), | |
'id' => 'contact', | |
'description' => esc_html__( 'Add widgets here.', 'helpwp' ), | |
'before_widget' => '<section id="%1$s" class="widget %2$s">', | |
'after_widget' => '</section>', | |
'before_title' => '<h4 class="widget-title">', | |
'after_title' => '</h4>', | |
) ); | |
} | |
add_action( 'widgets_init', 'helpwp_widgets_init' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment