Created
May 6, 2018 18:16
-
-
Save anatol06/34b3b2f27cde0e71d3628eb08bc5c6e1 to your computer and use it in GitHub Desktop.
Regeister and init Sidebar and 4 footer widgets
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
// Widget Locations | |
function fc_init_widgets($id){ | |
register_sidebar(array( | |
'name' => 'Sidebar', | |
'id' => 'sidebar', | |
'before_widget' => '<div class="sidebar-widget">', | |
'after_widget' => '</div>', | |
'before_title' => '<h3>', | |
'after_title' => '</h3>' | |
)); | |
register_sidebar(array( | |
'name' => 'Footer 1', | |
'id' => 'footer1', | |
'before_widget' => '<div>', | |
'after_widget' => '</div>', | |
'before_title' => '<h3>', | |
'after_title' => '</h3>' | |
)); | |
register_sidebar(array( | |
'name' => 'Footer 2', | |
'id' => 'footer2', | |
'before_widget' => '<div>', | |
'after_widget' => '</div>', | |
'before_title' => '<h3>', | |
'after_title' => '</h3>' | |
)); | |
register_sidebar(array( | |
'name' => 'Footer 3', | |
'id' => 'footer3', | |
'before_widget' => '<div>', | |
'after_widget' => '</div>', | |
'before_title' => '<h3>', | |
'after_title' => '</h3>' | |
)); | |
register_sidebar(array( | |
'name' => 'Footer 4', | |
'id' => 'footer4', | |
'before_widget' => '<div>', | |
'after_widget' => '</div>', | |
'before_title' => '<h3>', | |
'after_title' => '</h3>' | |
)); | |
} | |
add_action('widgets_init', 'fc_init_widgets'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment