Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Language versions of text strings in header element #334770

    Hi Peter,

    Thanks for your answer anyways :-)
    Yes, CML works fine with Enfold. I’ll continue to ask CML.

    Br, Rainer

    ps. you can close this one.

    I have found a solution to this problem and I just wanted to share it here for anyone else having the same problem. The code to add to the functions.php is the one below. You need to change the language codes according to your needs and of course the divs, classes and your text. Here you are:

    To insert in the functions.php and modify according to your own language slugs and divs and css styles:

    // Adds extra element to the header
    add_action(‘ava_main_header’, ‘ava_cml_shortcode_text’);

    function ava_cml_shortcode_text(){
    if(CMLLanguage::get_current_slug() == “sv”){
    ?>
    <div class=’Your own’>
    <p class=”Your own”>Your own text</p>
    </div><?php
    }elseif(CMLLanguage::get_current_slug() == “fi”){
    ?>
    <div class=’Your own’>
    <p class=”Your own”>Your own text</p>
    </div><?php
    }
    }

    • This reply was modified 10 years ago by Lingvafix. Reason: Sharing the solution
    in reply to: Insert a banner or written info into the header #313938

    Thanks! I’ll try that when I start with the language versions.

    Rainer

    in reply to: Insert a banner or written info into the header #313224

    Hi,
    This was perfectly just on time support. I was about to ask the same question on how to get text into the header. Thanks to your superb help/advice it works like a dream. Great!

    A question though. If I have a bilingual site, how will I get different language versions? I am planning on using WPML. Will that solve my problem, since the text is in the functions.php file? Or is there any other way to do this so that it can be handled easily on a bilingual site?

    Cheers,
    Rainer

    in reply to: CSS for main menu follows on to drop-down submenu #308846

    Hello Yigit,

    Thanks for the help. I had to put an !important afterwards to get it to function. But this means reducing all items equally much and since the menu items all have different width (different amount of letters) I decided to give them individual width percentages. Since the top menu doesn’t change that often, I think it is the easiest way at the moment. So that resolves it for now and thanks once again for your help.
    Here’s still an example of the css style if someone else needs it (the menu-item-number should of course correspond to the right menu item respectively):
    #menu-item-2988 .avia-menu-fx { width: 86.5%!important; }

    Cheers, Rainer
    ps. but if you can think of a way to get it to adjust automatically I’d be glad to hear about it :-)

    in reply to: CSS for main menu follows on to drop-down submenu #308684

    Thanks! That did the trick for the rounded corners.
    Any ideas/suggestions for the green hover underline thing?
    Regards,
    Rainer

    in reply to: CSS for main menu follows on to drop-down submenu #307716
    This reply has been marked as private.
Viewing 6 posts - 1 through 6 (of 6 total)