• Resolved kikib

    (@kikib)


    I have shortcodes in 2 places. One is in mobile area that appears only in mobile and another is in desktop. However, the dropdown isn’t showing in the desktop, only in mobile. I think that adding the shortcode cancel the last one out.

    My code is like this

    <header>
    <div class="container">
    
    <div class="col-2 text-left">
    [logo stuff]
    </div>
    
    <div class="d-flex"> (had it disappear on desktop)
    [toggle button to trigger mobile nav menu]
    [translator shortcode]
    </div>
    
    <div class="collapse navbar-collapse justify-content-end col-lg-10 flex-column align-self-start"> (Shown on desktop but not in mobile)
    [topbar]
    <div class="d-flex">
    [desktop nav menu]
    [translator shortcode]
    </div>
    
    </div>
    
    </div>
    </header>
    [mobile header nav menu that appears in mobile when toggled on and off]

    Do you have any idea on how to fix this issue of having 2 shortcodes in header.php? I’m working on editing the header.php to work with one shortcode but it would be nice to figure out how to make it works for 2 shortcodes.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author edo888

    (@edo888)

    Hi,

    It is not a good idea to have the language selector in 2 locations, since it copies a lot of code which is not optimal and can create conflicts.

    You better place it in one place and make it responsive based on the screen resolution using CSS rules.

    Thanks! 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘shortcode in 2 locations in header.php’ is closed to new replies.