Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #944636

    I have the following code in my functions.php file to add a widget area below the secondary menu and it has worked beautifully for a while now. Out of the blue (today), I see that the widget area is no longer there on the front end of the site. I never changed anything on the site.

    I checked Appearance>Widgets within the admin and the widget area “Below Menu” exists along with a basic text widget, but nothing displays on the site. I ran a search for “orange_bar” (custom class for my widget –see below) within the source of the site and nothing is found. It’s like the ‘ava_after_main_container’ hook no longer works.

    Does anyone know what went wrong and how do I fix it?

    /* Add widget area below main menu */
    add_action( 'ava_after_main_container', 'enfold_customization_below_menu_widget_area' );
    function enfold_customization_below_menu_widget_area() {
    	dynamic_sidebar( 'Below Menu' );
    }
    if ( function_exists('register_sidebar') )
      register_sidebar(array(
        'name' => 'Below Menu',
        'before_widget' => '<div class = "widget clearfix widget_text orange_bar"><div class="container">',
        'after_widget' => '</div></div><div class="container"><div class="arrow-down"></div></div>',
        'before_title' => '<h3>',
        'after_title' => '</h3>',
      )
    );
    • This topic was modified 6 years, 7 months ago by G.
    #944666

    Hi G,

    I’m not really sure what went wrong however, I can assure you that the hook still works.
    Can you give us a link to your site? and also ftp access, so we can try to check it and debug.
    Just post the details in private content, so it’s visible only to the moderators and you.

    Best regards,
    Nikko

    #944705

    Details provided (private)

    #944726

    Nevermind I figured it out. I was using “The Events Calendar” plugin and “Events List” widget within the widget area “Below Menu”. Within the widget, I had “Show widget only if there are upcoming events” checked. I didn’t realize this would remove the entire widget area from the site. I unchecked it and now my widget area is back on the site!

    Hope this proves to be useful for anyone using the events list widget!

    #944831

    Hi G,

    Great, glad you found the problem and thanks for sharing your solution. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.