Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- */ Description
- =================*/
- Builds the definition for sidebars and returns the ID. Call on "widgets_init" action.
- */ Usage
- =================*/
- <?php register_sidebar( $args ); ?> /* For Single Sidebar */
- <?php register_sidebars( $number, $args ); ?> /* For Multiple Sidebar */
- */ Default Usage For Single Sidebar
- =====================================*/
- <?php $args = array(
- 'name' => __( 'Sidebar name', 'theme_text_domain' ),
- 'id' => 'unique-sidebar-id',
- 'description' => '',
- 'class' => '',
- 'before_widget' => '<li id="%1$s" class="widget %2$s">',
- 'after_widget' => '</li>',
- 'before_title' => '<h2 class="widgettitle">',
- 'after_title' => '</h2>' ); ?>
- */ Calling The Sidebar
- =======================*/
- <?php dynamic_sidebar( '__name__' ); ?>
- */ Parameters Descriptions
- ===============================*/
- args
- (string/array) (optional) Builds Sidebar based off of 'name' and 'id' values.
- # Default: None
- * name - Sidebar name (default is localized 'Sidebar' and numeric ID).
- * id - Sidebar id - Must be all in lowercase, with no spaces (default is a numeric auto-incremented ID).
- * description - Text description of what/where the sidebar is. Shown on widget management screen.
- * class - CSS class name to assign to the widget HTML
- * before_widget - HTML to place before every widget
- * after_widget - HTML to place after every widget
- * before_title - HTML to place before every title
- * after_title - HTML to place after every title
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement