• I registered a new widget area in the footer , when I go in my widget manager I see that new area but when I insert something, it doesnt appear in my footer. What else have I to add to the following code?

    function register_widget_areas() {
    
      register_sidebar( array(
        'name'          => 'Footer area one',
        'id'            => 'colophon',
        'description'   => 'This widget area discription',
        'before_widget' => '<section class="footer-area  colophon ">',
        'after_widget'  => '</section>',
        'before_title'  => '<h4>',
        'after_title'   => '</h4>',
      ));
      
    }
    
    add_action( 'widgets_init', 'register_widget_areas' );
    
    

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi @sacconi ,
    You will need to call the function to get the widget content in the place you want to display. In your case, please add the below code to the place in footer.php where you want to display the widget content.

    <?php if ( is_active_sidebar( 'colophon' ) ) : ?>
            <?php dynamic_sidebar( 'colophon' ); ?>
    <?php endif; ?>

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Activating widget area in the footer’ is closed to new replies.