wp_title showing markup tags (4 posts)

  1. nmcleish
    Posted 3 years ago #

    Hi folks.
    If you have a look at the title on the web page here:
    http://wacademy.co.uk/training/hairdressing-apprenticeship-chesterfield-vacancy-kc028/ , you'll see span tags.
    How do I stop those from appearing there please? It doesn't happen on any of the other section in the site, just on those careers pages.
    I have had a look in the theme files for anything that might indicate why it is happening but haven't been able to find anything.

    Any help would be most appreciated.

    Best regards,


  2. esmi
    Forum Moderator
    Posted 3 years ago #

    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.

  3. nmcleish
    Posted 3 years ago #

    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.

    	 * 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 ) );

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

  4. esmi
    Forum Moderator
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic