Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #566532

    Hi, I would you like to make my website multilingual, so I want to add a languages bar in the header area (a bar with flag images and link them to different URLs when clicked), and I’m not going to use a plugin like WPML. I searched the archives to learn how I can add such bar, and found a post by Yigit in which he instructed that we should add code to the header.php file (and a couple of custom CSS lines) https://kriesi.at/support/topic/how-do-i-get-a-language-flag-on-the-top-above-the-search-bar/
    The problem is, and I may be wrong, if we add any code to the header.php file, it will be erased with the first theme update. I’m using a child theme, but there is no header.php file in the child theme. So my question is, how can I add a flags bar to the header without it getting erased with the first theme update. Or let me know if there is any other solution, other than the one in the above link, for adding a flags bar to the header, thanks.

    #566598

    Hey amrman0!

    The header.php file, can just be copyed from the original theme, to the child theme.
    Then, it will get over-writted. Please do let us know if you have any more questions, we will be more than happy to help you out.

    Cheers!
    Basilis

    #575331

    Thank you for your reply. I now understand that I can copy the header.php file from the parent theme to the child theme. However, when I tried to follow the instructions in the old post by Yigit (referenced in my original post), I couldn’t because obviously some theme code has changed since 2013 (date of Yigit’s post). For example, he said “In your WordPress directory go to Choices folder and open Header.php file and search for “display the themes social media icons” “. There is no such phrase currently in the header.php file.
    So please let me know how to add a language bar flags in the header area in the present day Enfold theme.

    #575364

    Hi,

    Depends on what kind of header are you using, can you post the link to your website please? a mockup of what you want to achieve would be helpful too.

    Regards,
    Josue

    #575427

    Hi, thanks for your reply. Here is a mockup of what I want http://postimg.org/image/ey4kpskrj/ But I would like to add more flags (not just 2 as in the mockup), like this bar http://postimg.org/image/vn60lphcv/
    My under construction website URL is in the private reply, thank you.

    #576868

    Hey!

    Add the html markup of the flags in a text widget and then you can use the following filter. http://kriesi.at/documentation/enfold/adding-a-widget-area-to-the-header/

    Best regards,
    Ismael

    #577323

    Hi, I don’t know the HTML code for the flags language bar, can you supply it to me or do I have to hire someone?

    #577506

    Hi!

    It’s not that hard, try something like this:

    <ul class='custom_flags'>
    <li><a href='link1'><img src='flag_url1'></a></li>
    <li><a href='link2'><img src='flag_url2'></a></li>
    <li><a href='link3'><img src='flag_url3'></a></li>
    </ul>

    Replace “link/flag_url” accordingly.

    Regards,
    Josue

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