-
AuthorPosts
-
August 4, 2018 at 9:22 am #993468
I would like to add a widget area inside the header meta. However when i add the following code
add_action( 'avia_meta_header', 'enfold_customization_header_widget_area' ); function enfold_customization_header_widget_area() { dynamic_sidebar( 'meta-header' ); }
It wont let me because I already have a widget inside the header which is
/* ADD HEADER */ add_action( 'ava_after_main_menu', 'enfold_customization_header_widget_area' ); function enfold_customization_header_widget_area() { dynamic_sidebar( 'header' ); }
How can I add the extra widget into the header meta area next to the Secondary Menu ?
Many Thanks
Regards
Colin- This topic was modified 6 years, 4 months ago by waveseven.
August 5, 2018 at 6:59 am #993612Hey waveseven,
Please try this instead:
/* ADD HEADER */ add_action( 'ava_after_main_menu', 'enfold_customization_header_widget_area' ); function enfold_customization_header_widget_area() { dynamic_sidebar( 'header' ); dynamic_sidebar( 'meta-header' ); }
Best regards,
RikardAugust 5, 2018 at 10:12 am #993647Hi Rikard
Thanks for the reply. That’s great but that puts the extra widget area into my main navigation bar which is handy to know. But what I would like it to appear in Header Secondary Menu that appears above the logo which is set under Extra Elements
Header Secondary Menu
Choose if you want to display a secondary menu and where to display it
Secondary Menu in top bar at the rightMany Thanks
Regards
ColinAugust 7, 2018 at 5:14 am #994208Hi,
The first hook that you used should have worked.
add_action( 'avia_meta_header', 'enfold_customization_header_widget_area' ); function enfold_customization_header_widget_area() { dynamic_sidebar( 'meta-header' ); }
What happens when you add that hook? Please post the login details in the private field so that we can test it.
Best regards,
IsmaelAugust 7, 2018 at 9:20 am #994278Hi Ismael
Login details to a test version of the site are in Private content below
I’ve put a red box around my item so that you can see it. I want it next to “open an account” at the top.
Many Thanks
Regards
ColinAugust 8, 2018 at 2:18 am #994655Hi,
Thanks for the update.
I adjusted the filter a bit. The widget is now inside the top bar or meta header. Add a few css codes to adjust the its position.
/* ADD HEADER */ add_action( 'ava_after_main_menu', 'ava_after_main_menu_header_widget' ); function ava_after_main_menu_header_widget() { dynamic_sidebar( 'header' ); } add_action( 'avia_meta_header', 'avia_meta_header_woo_tax' ); function avia_meta_header_woo_tax() { dynamic_sidebar( 'meta-header' ); } add_filter('avf_execute_avia_meta_header', '__return_true' );
Best regards,
IsmaelAugust 8, 2018 at 9:18 am #994753Hi Ismael
That’s brilliant, thank you,.
You guys are fantastic as always.
Regards
ColinAugust 8, 2018 at 11:11 am #994848 -
AuthorPosts
- You must be logged in to reply to this topic.