Advertisement
pratikshrestha

Helena Pro Child Add footer Top Sidebar

Oct 29th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.07 KB | None | 0 0
  1. function helena_child_add_sidebar() {
  2.     register_sidebar( array(
  3.         'name'          => esc_html__( 'Footer Top', 'helena-pro' ),
  4.         'id'            => 'footer-top',
  5.         'before_widget' => '<section id="%1$s" class="widget %2$s"><div class="widget-wrap">',
  6.         'after_widget'  => '</div><!-- .widget-wrap --></section><!-- #widget-default-search -->',
  7.         'before_title'  => '<h2 class="widget-title">',
  8.         'after_title'   => '</h2>',
  9.         'description'   => esc_html__( 'Footer Top widget area.', 'helena-pro' ),
  10.     ) );
  11. }
  12. add_action( 'widgets_init', 'helena_child_add_sidebar', 100 );
  13.  
  14. function helena_child_footer_top_sidebar() {
  15.     if ( is_active_sidebar( 'footer-top' ) ) : ?>
  16.     <div id="supplementary" class="one footer-top">
  17.         <div class="wrapper">
  18.             <div id="first" class="widget-area" role="complementary">
  19.                 <?php dynamic_sidebar( 'footer-top' ); ?>
  20.             </div><!-- #first .widget-area -->
  21.         </div> <!-- .wrapper -->
  22.     </div><!-- #supplementary -->
  23.     <?php
  24.     endif;
  25. }
  26. add_action( 'helena_after_content', 'helena_child_footer_top_sidebar', 19 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement