Do not show site title in header

Hi

My client would like me not to have the site title and strapline appear as text in the header - since it repeats the title and strapline of the logo.

I wonder, could you tell me how to do this?

Thank you,

Oliver

Hello Oliver,

You could be able to accomplish it with a child theme. In your child theme’s functions, add this code:

    function greatmag_site_branding() {
    	$header_ad_image 	= get_theme_mod('header_ad_image');
    	$header_ad_url		= get_theme_mod('header_ad_url');
    	?>
    		<div class="site-branding vhome3 row m0">
    			<div class="container">
    				<div class="main-logo">
    					<div class="media">
    						<?php if ( function_exists( 'the_custom_logo' ) && has_custom_logo() ) : ?>
    						<div class="media-left">
    							<?php the_custom_logo(); ?>
    						</div>
    						<?php endif; ?>
    						<div class="media-body">
    							<?php
    							$description = get_bloginfo( 'description', 'display' );
    							if ( $description || is_customize_preview() ) : ?>
    								<p class="site-description site-slogan"><?php echo $description; /* WPCS: xss ok. */ ?></p>
    							<?php
    							endif;
    						</div>
    					</div>
    				</div>
    				<?php if ( $header_ad_image ) : ?>
    					<div class="header-ad">
    						<a target="_blank" href="<?php echo esc_url($header_ad_url); ?>"><img src="<?php echo esc_url($header_ad_image); ?>"/></a>
    					</div>
    				<?php endif; ?>
    			</div>
    		</div><!-- .site-branding -->
    	<?php
    }

You could also use CSS code solution if you aren’t running a child theme. Add this simple CSS code to Appearance > Customize > Additional CSS from dashboard.

    .site-branding .site-title {
      display: none;
    }

Regards,
Kharis
aThemes Support