• Hello!

    I want all pages except my front page to display a shorter version of my logo. My theme is the latest version of Divi.

    I have successfully done this on all my pages but I am wondering if there is an easier way because as of right now, when I add a new page or project to my website I’m going to have to go into my header.php and add the page or project to the code. Here is what I’ve done so far:

    <?php
         //This is targeting the page with the id 80.
         } elseif ( is_page( '80' ) ) {
    ?>
           <div class="logo_container">
             <span class="logo_helper"></span>
             <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
               <img class="custom-logo" src="PATH TO LOGO" />
             </a>
           </div>

    I repeated this for every page using the method above, and every project using is_single and archive pages using is_archive. I understand there’s probably not a way to target all pages (except front page) but is there a way to target all projects at once so when I add a new project I won’t have to add the id to the header.php file?

    Thanks so much, guys!

  • The topic ‘Adding a different logo to all pages except front page’ is closed to new replies.