I have the following widget location defined in my theme’s functions.php:

register_sidebar( array(
    'name' => __( 'Opening Hours', 'transparent' ),
    'id' => 'sidebar-hours',
    'description' => __( 'Appears on the front page', 'transparent' ),  
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="widget-title">',
    'after_title' => '</h3>',
) );

This widget location is appearing in Admin > Appearance > Widgets, and I have a HTML text widget in this location.

In my theme’s index.php, I have the following code:

<?php if ( is_active_sidebar( 'sidebar-hours' ) ) : ?>
    <p class="opening-hours">
      <?php dynamic_sidebar( 'sidebar-hours' ); ?>
    </p>
<?php endif; ?>

However, on the front end of the website, the widget text is not appearing. It should be below the navigation menu.

Can you provide troubleshooting advice please?

Read more here: Custom widget not appearing on front end


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , ,

Wordpress related questions and answers: