Viewing 3 replies - 1 through 3 (of 3 total)
  • Check your theme’s header.php and function.php files. The latter may include a function that is being applied to the title via a filter.

    Thread Starter nmcleish

    (@nmcleish)

    Hi esmi.
    Thanks for your response.
    I can’t see anywhere in the functions.php file which modifies the title.

    The header file contains the code below and I can’t see where the issue might be.
    What I do know is that in the content of the page itself, the page heading is repeated (where it says Hairdressing Apprentice…) and that span is applied to that. So it looks like that is being picked up and carried to the title somehow.
    Here’s the title tag code in the header.php file, if it sheds any light on it?
    Thanks in advance for you advice, it is appreciated.

    <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>

    As you can see it is a spawn of the twentyeleven theme.
    All the best,
    Neil.

    Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the original Twenty Eleven theme to rule out any theme-specific problems.

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_title showing markup tags’ is closed to new replies.