Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Unregister the original sidebars (with h1 title tags) and reregister (with default h2 title tags).
- *
- */
- function thb_reinitialize_sidebars() {
- unregister_sidebar( 'thbusiness-main-sidebar' );
- unregister_sidebar( 'thbusiness-business-top-sidebar' );
- unregister_sidebar( 'thbusiness-business-left-sidebar' );
- unregister_sidebar( 'thbusiness-business-right-sidebar' );
- unregister_sidebar( 'thbusiness-business-bottom-sidebar' );
- unregister_sidebar( 'footer-left' );
- unregister_sidebar( 'footer-mid' );
- unregister_sidebar( 'footer-right' );
- register_sidebar( array(
- 'name' => __( 'Main Sidebar', 'thbusiness' ),
- 'id' => 'thbusiness-main-sidebar',
- 'description' => '',
- 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h2 class="widget-title">',
- 'after_title' => '</h2>',
- ) );
- register_sidebar( array(
- 'name' => __( 'Business Template Top Area', 'thbusiness' ),
- 'id' => 'thbusiness-business-top-sidebar',
- 'description' => 'Shows the widgets on the top area of the business page.',
- 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h2 class="business-page-widget-title">',
- 'after_title' => '</h2>',
- ) );
- register_sidebar( array(
- 'name' => __( 'Business Template Left Area', 'thbusiness' ),
- 'id' => 'thbusiness-business-left-sidebar',
- 'description' => 'Shows the widgets on the left area of the business page.',
- 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h2 class="business-page-widget-title">',
- 'after_title' => '</h2>',
- ) );
- register_sidebar( array(
- 'name' => __( 'Business Template Right Area', 'thbusiness' ),
- 'id' => 'thbusiness-business-right-sidebar',
- 'description' => 'Shows the widgets on the right area of the business page.',
- 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h2 class="business-page-widget-title">',
- 'after_title' => '</h2>',
- ) );
- register_sidebar( array(
- 'name' => __( 'Business Template Bottom Area', 'thbusiness' ),
- 'id' => 'thbusiness-business-bottom-sidebar',
- 'description' => 'Shows the widgets on the bottom area of the business page.',
- 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h2 class="business-page-widget-title">',
- 'after_title' => '</h2>',
- ) );
- register_sidebar( array(
- 'name' => __( 'Footer Left Sidebar', 'thbusiness' ),
- 'id' => 'footer-left',
- 'description' => '',
- 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h2 class="footer-widget-title">',
- 'after_title' => '</h2>',
- ) );
- register_sidebar( array(
- 'name' => __( 'Footer Mid Sidebar', 'thbusiness' ),
- 'id' => 'footer-mid',
- 'description' => '',
- 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h2 class="footer-widget-title">',
- 'after_title' => '</h2>',
- ) );
- register_sidebar( array(
- 'name' => __( 'Footer Right Sidebar', 'thbusiness' ),
- 'id' => 'footer-right',
- 'description' => '',
- 'before_widget' => '<aside id="%1$s" class="widget %2$s">',
- 'after_widget' => '</aside>',
- 'before_title' => '<h2 class="footer-widget-title">',
- 'after_title' => '</h2>',
- ) );
- }
- add_action( 'widgets_init', 'thb_reinitialize_sidebars', 20 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement