-
AuthorPosts
-
April 20, 2018 at 5:01 pm #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.
April 20, 2018 at 5:59 pm #944666Hi 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,
NikkoApril 20, 2018 at 6:37 pm #944705Details provided (private)
April 20, 2018 at 7:07 pm #944726Nevermind 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!
April 21, 2018 at 8:03 am #944831 -
AuthorPosts
- You must be logged in to reply to this topic.