Skip to content
Advertisement

WordPress with Divi does not show display logo in main menu

Hy, i work on a website made with WordPress, Divi and a child theme. I have an header with a navigation and the logo centered on the nav. The header is fine when i’m connected but when i’m not connected (like a visitor) the logo is on display: none and out of the navigation list. The header is generated by WordPress, the logo is insert in the general section of Divi settings.

Here is the code when i’m connected to the Back office

<header id="main-header" data-height-onload="66">
    <div class="container clearfix et_menu_container">
        <div id="et-top-navigation" data-height="66" data-fixed-height="66">
            <nav id="top-menu-nav">
                <ul id="top-menu" class="nav">
                   <li id="menu-item-993" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-993"><a href="https://dev.lacaravelleverte.com/plantes-et-epices/">Plantes et Épices</a></li>
                   <li id="menu-item-758" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-758"><a href="https://dev.lacaravelleverte.com/les-coffrets/">Les coffrets</a></li>
                   <li id="menu-item-994" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-994"><a href="https://dev.lacaravelleverte.com/accessoires/">Accessoires</a></li>
                   <li class="centered-inline-logo-wrap">
                      <div class="logo_container">
                         <span class="logo_helper"></span>
                         <a href="https://dev.lacaravelleverte.com/">
                            <img src="https://dev.lacaravelleverte.com/wp-content/uploads/2020/07/logo-caravelle-verte.svg" alt="La Caravelle Verte" id="logo" data-height-percentage="100">
                         </a>
                      </div>
                   </li>
                   <li id="menu-item-5143" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-5143">
                     <a href="#">Qui sommes-nous ?</a>
                     <ul class="sub-menu">
                       <li id="menu-item-756" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-756"><a href="https://dev.lacaravelleverte.com/qui-sommes-nous/">Notre Histoire</a></li>
                       <li id="menu-item-1150" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1150"><a href="https://dev.lacaravelleverte.com/nos-certifications/">Nos certifications</a></li>
                     </ul>
                   </li>
                   <li id="menu-item-757" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-757"><a href="https://dev.lacaravelleverte.com/les-producteurs/">Les producteurs</a></li>
                   <li id="menu-item-831" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-831"><a href="https://dev.lacaravelleverte.com/blog-recettes/">Blog &amp; Recettes</a></li>
                </ul>
            </nav>
            <div id="et_mobile_nav_menu">
                <div class="mobile_nav closed">
                    <span class="select_page">Sélectionner une page</span>
                    <span class="mobile_menu_bar mobile_menu_bar_toggle"></span>
                </div>
            </div>              
        </div> <!-- #et-top-navigation -->
    </div> <!-- .container -->
    <div class="et_search_outer">
        <div class="container et_search_form_container">
            <form role="search" method="get" class="et-search-form" action="https://dev.lacaravelleverte.com/">
                <input type="search" class="et-search-field" placeholder="Rechercher …" value="" name="s" title="Rechercher:">                  
            </form>
            <span class="et_close_search_field"></span>
        </div>
    </div>
</header>

And here is the code when i’m not connected to the Back office

<header id="main-header" data-height-onload="66">
    <div class="container clearfix et_menu_container">
        <div class="logo_container">
            <span class="logo_helper"></span>
            <a href="https://dev.lacaravelleverte.com/">
                <img src="https://dev.lacaravelleverte.com/wp-content/uploads/2020/07/logo-caravelle-verte.svg" alt="La Caravelle Verte" id="logo" data-height-percentage="100">
            </a>
        </div>
        <div id="et-top-navigation" data-height="66" data-fixed-height="66">
            <nav id="top-menu-nav">
                <ul id="top-menu" class="nav">
                   <li id="menu-item-993" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-993"><a href="https://dev.lacaravelleverte.com/plantes-et-epices/">Plantes et Épices</a></li>
                   <li id="menu-item-758" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-758"><a href="https://dev.lacaravelleverte.com/les-coffrets/">Les coffrets</a></li>
                   <li id="menu-item-994" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-994"><a href="https://dev.lacaravelleverte.com/accessoires/">Accessoires</a></li>
                   <li id="menu-item-5143" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-5143">
                     <a href="#">Qui sommes-nous ?</a>
                     <ul class="sub-menu">
                       <li id="menu-item-756" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-756"><a href="https://dev.lacaravelleverte.com/qui-sommes-nous/">Notre Histoire</a></li>
                       <li id="menu-item-1150" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-1150"><a href="https://dev.lacaravelleverte.com/nos-certifications/">Nos certifications</a></li>
                     </ul>
                   </li>
                   <li id="menu-item-757" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-757"><a href="https://dev.lacaravelleverte.com/les-producteurs/">Les producteurs</a></li>
                   <li id="menu-item-831" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-831"><a href="https://dev.lacaravelleverte.com/blog-recettes/">Blog &amp; Recettes</a></li>
                </ul>
            </nav>
            <div id="et_mobile_nav_menu">
                <div class="mobile_nav closed">
                    <span class="select_page">Sélectionner une page</span>
                    <span class="mobile_menu_bar mobile_menu_bar_toggle"></span>
                </div>
            </div>              
        </div> <!-- #et-top-navigation -->
    </div> <!-- .container -->
    <div class="et_search_outer">
        <div class="container et_search_form_container">
            <form role="search" method="get" class="et-search-form" action="https://dev.lacaravelleverte.com/">
                <input type="search" class="et-search-field" placeholder="Rechercher …" value="" name="s" title="Rechercher:">                  
            </form>
            <span class="et_close_search_field"></span>
        </div>
    </div>
</header>

We can see the logo container is moving. When i’m connected it’s in the navigation list and when i’m not connected it’s out of the navigation. I don’t touch anything in the header.php of my child theme. It’s for that i’m out of ideas.

I wish i’m almost clear.

Thank’s for your time.

Advertisement

Answer

I’m sorry, but i resolve it. It was the configuration of WP Rocket ! thank’s for your time !

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement