• Hello.
    I want to have both logo and title + description in the header.
    What should I do ?
    When I add a logo, title and description disappear.

    Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Anders Norén

    (@anlino)

    Hi @vfavrat,

    Baskerville doesn’t support displaying both the logo and the site title, unfortunately, so you’ll have to create a child theme and modify the header.php file to make that happen.

    — Anders

    Thread Starter Virginie FAVRAT

    (@vfavrat)

    Thanks for your quick answer.
    I tried to put the logo in the header image. But it appears blurred.
    For example here : https://psmstruffaut.blog.ac-lyon.fr/wordpress/

    Why ?

    The picture used in the header : https://psmstruffaut.blog.ac-lyon.fr/wordpress/wp-content/uploads/2021/10/avec-logo-1.png

    If you are using a child theme, you might want to try the following code (located in header.php).

    <div class="header-inner section-inner">
    
    	<div>
    
    		<?php 
    
    		$custom_logo_id 	= get_theme_mod( 'custom_logo' );
    		$legacy_logo_url 	= get_theme_mod( 'baskerville_logo' );
    		$blog_title_elem 	= ( ( is_front_page() || is_home() ) && ! is_page() ) ? 'h1' : 'div';
    		$blog_title_class 	= $custom_logo_id ? 'blog-logo' : 'blog-title';
    
    		$blog_title 		= get_bloginfo( 'title' );
    		$blog_description 	= get_bloginfo( 'description' );
    
    		if ( $custom_logo_id  || $legacy_logo_url ) : 
    
    			$custom_logo_url = $custom_logo_id ? wp_get_attachment_image_url( $custom_logo_id, 'full' ) : $legacy_logo_url;
    
    			?>
    
    			<a class="logo" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home" style="float:left; clear:both;" >
    				<img src="<?php echo esc_url( $custom_logo_url ); ?>">
    				<span class="screen-reader-text"><?php echo $blog_title; ?></span>
    			</a>
    
    		<?php endif; ?>
    
    		<h1 class="blog-title">
    			<a href="<?php echo esc_url( home_url() ); ?>" rel="home"><?php echo $blog_title; ?></a>
    		</h1>
    
    		<?php if ( $blog_description ) : ?>
    			<h3 class="blog-description"><?php echo $blog_description; ?></h3>
    		<?php endif; ?>
    
    	</div>
    
    </div><!-- .header-inner -->
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Logo and title’ is closed to new replies.