• Hi,

    I’m using the Minimatica theme and decided to start to implement some very basic SEO. I decided to use the Bubble SEO plugin but unfortunately the title tag preferences in the SEO plugin won’t seem to overwrite the theme’s default title configuration which, in short, is: Blog Name | Blog Description. With the plugin all I really want to do is change this to Blog Name – Blog Description but at the moment they both appear alongside one another.

    Minimatica generates the title tag using a theme function
    <title><?php minimatica_doc_title(); ?></title>

    In functions.php this is written as:

    if ( ! function_exists( 'minimatica_doc_title' ) ) :
    /**
     * Output the <title> tag
     *
     * @since Minimatica 1.0
     */
    function minimatica_doc_title() {
    	global $page, $paged;
    	$doc_title = '';
    	$site_description = get_bloginfo( 'description', 'display' );
    	$separator = '#8212';
    	if ( !is_front_page() ) :
    		$doc_title .= wp_title('', false);
    		if ( $paged >= 2 || $page >= 2 )
    			$doc_title .=  ', ' . __( 'Page' ) . ' ' . max( $paged, $page );
    		if ( is_archive() )
    			$doc_title .=  ' &' . $separator . '; ';
    		elseif ( is_singular() )
    			$doc_title .=  ' &' . $separator . '; ';
    	endif;
    	if ( is_archive() )
    		$doc_title .= get_bloginfo( 'name' );
    	elseif ( is_singular() )
    		$doc_title .= get_bloginfo( 'name' );
    	elseif ( is_front_page() )
    		$doc_title .= get_bloginfo( 'name' );
    	if ( is_front_page() && ( $paged >= 2 || $page >= 2 ) )
    		$doc_title .=  ', ' . __( 'Page' ) . ' ' . max( $paged, $page );
    	if ( $site_description && ( is_home() || is_front_page() ) )
    		$doc_title .= ' &' . $separator . '; ' . $site_description;
    	echo $doc_title;
    }
    endif;

    My question is this: what would be the best way to adapt this code so that the default Blog Title, Separator and Blog Description don’t display but that the settings in the SEO plugin have total control over title tags for pages?

    Please help! ??

  • The topic ‘Title Appearing Twice’ is closed to new replies.