1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Divi custom header error with shortcode translate press

Discussion in 'Free Divi Community Forum' started by Still Tinnitus, Dec 6, 2022.

  1. Still Tinnitus

    Still Tinnitus New Member

    Hi!

    I have created a custom header which is not working properly on mobile.
    To replicate the issue, please use IOS iPhone safari.
    I am using translatepress and have enabled the 'show opposite language in the language switcher'
    Also I have used this manual to make the menu disappear when scrolling down and appear when scrolling up. This uses a shortcode in the header. Maybe it is interfering with the shortcode of translate press? https://www.elegantthemes.com/blog/...olling-up-hide-while-scrolling-down-with-divi

    Replicate the issue:
    1. Go to https://stilltinnitus.com
    2. Click the flag --> you'll see it 'highlights' it instead of changing the language
    3. Click the flag again --> now, it changes the language
    This is not user friendly.

    Now please replicate this:

    1. Click the hamburger icon (menu opens)
    2. Click the flag (flag turns grey)
    3. Click the hamburger icon (nothing happens, it seems like it is 'out of focus' )
    4. click the hamburger icon again (now the menu closes again)

    It looks like there is some sort of 'focus' issue.

    If you open the website on a computer instead of mobile, and make the browser screen as wide as a phone, you will see that the issue does not appear. It seems it is because on the computer, you can hover to get the hover function to focus on the flag or the menu.

    Since this is not user friendly at all I hope you can help me out!

    Thanks
     
    #1 Still Tinnitus, Dec 6, 2022
    Last edited: Dec 6, 2022
    1. PRO MEMBER PERKS Divi Cart Count Plugin - Easily add cart count to your Divi cart icon. 6 different styles to choose from:Learn More
  2. Still Tinnitus

    Still Tinnitus New Member

    I think this is just due to the translate press coding of the language switcher shortcode. I managed to get the desired result (only click once to change the language) by doing this:

    - do not use language switcher shortcode
    - make a new menu with only the language switcher item
    - set this menu to show open, not hamburger style on mobile with this code. Done!

    /*show desktop menu on phone*/
    @Media (max-width: 980px) {
    .pa-open-mobile-menu .et_pb_menu__menu {
    display: flex!important;
    }
    .pa-open-mobile-menu .et_mobile_nav_menu {
    display: none!important;
    }
    }