Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
Hello,
I´m trying to add a language switcher in the main menu.
Found some code to add a navbar-widget, but the last part:
// Place the widget area after the navbar add_filter ('__after_navbar', 'add_my_widget'); function add_my_widget() { if (function_exists('dynamic_sidebar')) { dynamic_sidebar('Extra Widget After Navbar'); } }
is written for use with the Customizr theme.
Could you please tell me which filter “hook”-tags are used in the header code of Vantage?
Thanks in advance,
Tom
Here is a child theme you could try. If you have a child theme already running then you’ll just need to use the functions.php file from this child theme as well as the single selector I’ve inserted into style.css.
https://siteorigin.com/wp-content/uploads/2014/09/vantage-child-menu-widget-area1.zip
You can install the child theme from Appearance > Themes > Add New: Upload Theme. Child themes do require you to redo Appearance > Customize and Appearance > Menu settings.
It’s not a super intelligent solution. It assumes you’re not using the search in menu option. Once installed a new widget area will be available at Appearance > Widgets. You can adjust where the widget you add is positioned using the selector you’ll find in the style.css file of the child theme. You can edit this via Appearance > Editor once the child theme is activated. Below that you’ll find a breakpoint as you might need to shift your widget up into the header below a certain resolution. You can adjust this breakpoint and what happens at that breakpoint using the second selector in style.css of the child theme.
Try the child theme and decide whether it works before redoing any Customizer settings.
Hello Andrew.
I will definitely give your solution a try on my child-theme.
It´s not longer urgent, because the customer likes the switcher in the footer, which is no problem, but I want to learn more about the Vantage-Theme and it´s potential.
Thank you very much for your advice.
For sure. If you don’t require this then I’d say rather stick to the theme’s regular widget areas.
All the best for your future builds.
Yes, it would be safer to stick to the standard settings, but I have to be prepared for my customers wishes.
So I may bother you from time to time ;)
Keep up the good job! Best wishes,
Tom
Sorry for the delay here. Thanks for your positive feedback Tom, we’ll chat soon! Cheers.