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

    Hi,

    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:
    https://wordpressmu-16779-36860-119067.cloudwaysapps.com/de/ (you’ll see no icons in the top bar)

    Have a look at the Dutch version:
    https://wordpressmu-16779-36860-119067.cloudwaysapps.com/nl/
    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??

    #642837

    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 wordpressmu-16779-36860-119067.cloudwaysapps.com (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,
    Ismael

    #643405

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

    http://wordpressmu-16779-36860-119067.cloudwaysapps.com/nl/
    http://wordpressmu-16779-36860-119067.cloudwaysapps.com/en/

    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).
    Thanks.

    • This reply was modified 1 year, 6 months ago by  biekhois.
    #644012

    Hi,

    use this code inside of Quick CSS field:

    nav.sub_menu {
    float: right;
    }
    

    Best regards,
    Andy

    #644435

    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: https://snag.gy/BjlqR5.jpg
    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.

    #644762

    Hi,

    you can move them up by adding this as well:

    nav.sub_menu {
    top: -10px;
    }
    

    Adjust as needed.

    Best regards,
    Andy

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.