Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #642051


    I’m using MultilingualPress for a multisite network with multi languages. I implemented child themes for every subsite. In functions.php I implemented:
    add_action( ‘avia_meta_header’, ‘avia_mlp_language_switch’, 10);
    function avia_mlp_language_switch()
    if(function_exists( ‘mlp_show_linked_elements’ )) mlp_show_linked_elements( array( ‘link_text’ => ‘flag’, ‘show_current_blog’ => FALSE ) );

    The problem is: I’m not using the secondary menu. Only main menu with social media icons + telephone number in top bar. Because secondary menu is disabled, it seems ‘avia_meta_header’ isn’t fired. Look at German site where secondary is not enabled: (you’ll see no icons in the top bar)

    Have a look at the Dutch version:
    I enabled a secondary menu. First there was no effect, so I decided to create a new menu. No effect. When I added one page (“press room”) the flags became visible.

    No my question: I want to use MultilingualPress flags in the top bar without using secondary menu’s. If not possible, then I can create EMPTY secondary menu’s, but how to make the flags visible??


    Hey biekhois,

    Thank you for using Enfold.

    We tried to access the site but we got this error:

    Your connection is not private
    Attackers might be trying to steal your information from (for example, passwords, messages or credit cards). NET::ERR_CERT_AUTHORITY_INVALID
      Automatically report details of possible security incidents to Google. Privacy policy

    Please contact your hosting provider.

    Anyway, if you don’t want to create a secondary menu, add this in the functions.php file:

    add_filter( 'avf_execute_avia_meta_header', '__return_true', 10, 1);

    Best regards,


    Thanks Ismael.
    You can use http:// instead of https:// (SSL not ready yet)

    The language flags are visible:
    – added filter to functions.php
    – added action for switcher-code to functions.php
    – no secondary menu in settings theme

    Because the language flags are not in a menu, it’s difficult to configure settings for layout. They are displaying left below the top bar, on top of the logo. Are there any ways to control this element within the theme to place them between the telephone number (which is a setting) and the social icons (also a setting in enfold).

    • This reply was modified 7 years, 10 months ago by biekhois.


    use this code inside of Quick CSS field:

    nav.sub_menu {
    float: right;

    Best regards,


    Hm, yes, I tried that, nut strange things happen with normal CSS. The flag are floating half beneath the top bar… Look at the screenshot in Chrome:
    Weird, right? Looks like it has something to do with the MLP language box or UL.

    I have no extra HTML in Endfold settings for topbar.



    you can move them up by adding this as well:

    nav.sub_menu {
    top: -10px;

    Adjust as needed.

    Best regards,

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