基于Wordpress页面模板更改导航

I want to have a nav without the logo on the homepage and nav with the logo throughout the rest of the site. This is what I currently have in my header.php for my child theme.

<?php if ( is_page_template('page-templates/wex_home.php') ) : ?>
   <div class="btn-menu col-md-8 col-sm-6 col-xs-12"><i class="fa fa-navicon"></i></div>
   <nav id="mainnav" class="main-navigation col-md-8 col-sm-12 col-xs-12" role="navigation">
     <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' ) ); ?>
   </nav><!-- #site-navigation -->
<?php else : ?>
   <div class="site-branding col-md-4 col-sm-6 col-xs-12">
     <?php astrid_branding(); ?>
   </div>
   <div class="btn-menu col-md-8 col-sm-6 col-xs-12"><i class="fa fa-navicon"></i></div>
   <nav id="mainnav" class="main-navigation col-md-8 col-sm-6 col-xs-12" role="navigation">
     <?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' ) ); ?>
   </nav><!-- #site-navigation -->
<?php endif; ?>

An easy way to check if you are on the homepage in your header.php file is by using the is_front_page() function. More information can be found here.

I would try using the yellow pencil plugin which would allow to edit the CSS of a specific page. It has a nice editor to help you choose visibility of the logo on that page but simply pressing the hide and not visible button. Just a super easy way to achieve what you want.