I'm trying to display custom widget, but without success.
Functions.php
// Footer Widget options
function footer_widgets() {
register_sidebar( array(
'name' => 'Footer Options "Kontakt" ',
'id' => 'footer_options',
'before_widget' => '<div>',
'after_widget' => '</div>',
'before_title' => '<h2 class="rounded">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'footer_widgets' );
Inside dashboard I filled it with text, and right now I would like to displayt in footer:
I've tried this solutions, but can't display:
<div class="widgets"> <?php if ( is_active_sidebar( 'footer_widgets' ) ) : ?> <ul id="sidebar"> <?php dynamic_sidebar( 'footer_widgets' ); ?> </ul> <?php endif; ?> </div>
<div class="widgets"> <?php dynamic_sidebar( 'footer_widgets' ); ?> </div>
<div class="widgets"> <?php the_widget('footer_widgets'); ?> </div>
footer_options
instead offooter_widgets
in 1 and 2.the_widget()
is to call specific widget not widget area.