Tagged: 

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

    Hi support
    I’m using Polylang
    I’ve been adding flags on a site with php+CSS code.
    Everything is ok, but the function below hide the Enfold burger menu whenever the site is on a phone.

    I’ve duplicate helper-main-menu.php and place it in my child theme in a folder named includes/helper-main-menu.php
    Here’s the code I’ve add line 148

        * /Hook that can be used for plugins and theme extensions   */
          do_action('ava_after_main_menu');?>
             <?php // outputs a flags list (without languages names) ?>
               <div id="polylangMenu">
                  <ul class="lang-switch"><?php pll_the_languages(array('show_flags'=>1,'show_names'=>0));?></ul>
               </div>

    How can I hide it for the mobile display (so the enfold burger menu aooear).

    Many thanks !!

    #976256

    Hey Ikyo,

    You can add this css code in Quick CSS (located in Enfold > General Styling):

    @media only screen and (max-width:767px) {
      #polylangMenu {
        display: none !important;
      }
    }

    Hope it helps :)

    Best regards,
    Nikko

    #976264

    Thanks for your so quick answer.
    I tried to before aking the question, but without success
    As it’s a php inclusion on the header (in helper-main-menu.php) , it may overide the responsive menu and hide it sustainably

    The mobile menu is back when I remove the php code describe above (of copurse)
    But it not really help (except that the mobile menu doaes really work).

    Thanks for your kindfull help one more time
    King regards

    #976859

    Hi Ikyo,

    Thanks for giving us the link to your site.
    I inspected it and noticed that the burger menu isn’t there at all, have you modified header.php also?

    Best regards,
    Nikko

    #977123

    #OMG
    I underated the fact that the modified header.php was not up to date (according to the last version).
    I update it, and it works ! MANY thanks Nikko !

    For the record, I indicate how to add flags horizontal flags in the header when using polylang.
    1/ copy paste includes/helper-main-menu.php in the child theme
    2/ replace
    do_action('ava_after_main_menu'); // todo: replace action with filter, might break user customizations l.193
    by

    do_action('ava_after_main_menu');?>
       <?php // outputs a flags list (without languages names) ?>
           <div id="polylangMenu">
    	 <ul class="lang-switch">
                   <?php pll_the_languages(array('show_flags'=>1,'show_names'=>0));?>
             </ul>
          </div>
     <?

    and add appropriate CSS

    • This reply was modified 5 years, 9 months ago by Ikyo.
    #977184

    Hey!
    Glad the problem is solved now!

    Regards,
    Peter

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Polylang 'pll_the_languages' on mobile’ is closed to new replies.