Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi

    Check your theme header file. You’ll probably find that your theme is automatically inserting the site name at the end of the title.

    to check just turn off the yoast plugin and reload the page. you;ll probably find the site name still being called by the theme.

    Kevin

    sarthaksinghal

    (@sarthaksinghal)

    The below code is from the default Twenty Eleven Theme and you will run into the issue here also. See the code below which worked for me to resolve it.

    <title><?php
    	/*
    	 * Print the <title> tag based on what is being viewed.
    	 */
    	global $page, $paged;
    
    	wp_title( '|', true, 'right' );
    
    	// Add the blog name.
    	bloginfo( 'name' );
    
    	// Add the blog description for the home/front page.
    	$site_description = get_bloginfo( 'description', 'display' );
    	if ( $site_description && ( is_home() || is_front_page() ) )
    		echo " | $site_description";
    
    	// Add a page number if necessary:
    	if ( $paged >= 2 || $page >= 2 )
    		echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
    
    	?></title>

    Code which resolved the issue. If you look at the comments, the Name and Description related things have been removed below. It works what you enter in the meta settings of Yoast.

    <title><?php
    	/*
    	 * Print the <title> tag based on what is being viewed.
    	 */
    	global $page, $paged;
    	wp_title( '|', true, 'right' );
    
    	// Add a page number if necessary:
    	if ( $paged >= 2 || $page >= 2 )
    		echo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );
    
    	?></title>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Yoast titles and meta help’ is closed to new replies.