This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Add qTranslate flags with a navbar widget – filter “hooks”

Resolved 5 replies premiumthemetheme-vantage
11 years ago · Last reply by Andrew Misplon 11 years ago

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

URL: http://web64352.customer.xenway.de/wordpress/

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

5
  1. Andrew Misplon Staff 11 years, 5 months ago

    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.

  2. Tom Wöltge 11 years, 5 months ago

    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.

  3. Andrew Misplon Staff 11 years, 5 months ago

    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.

  4. Tom Wöltge 11 years, 5 months ago

    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

  5. Andrew Misplon Staff 11 years, 5 months ago

    Sorry for the delay here. Thanks for your positive feedback Tom, we’ll chat soon! Cheers.

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread