Support » How-To and Troubleshooting » [Resolved] why meta:title need “ at the end??

[Resolved] why meta:title need “ at the end??

  • reference the page:Meta Tags in WordPress

    I set meta:title in my page. but why meta:title need </title /> at the end?

    I have tried
    <title><?php bloginfo('name'); ?><?php wp_title(); ?></title> nothing print out in html source.

    but <title><?php bloginfo('name'); ?><?php wp_title(); ?></title /> could get the title part.

    And in wordpress.org, the meta:title is <title>WordPress › Blog Tool, Publishing Platform, and CMS</title> not <title>WordPress › Blog Tool, Publishing Platform, and CMS</title />

    What is this problem?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Michael


    Forum Moderator

    this was an error in the Codex; and is now corrected.


    @alchymyth, hey, I know this is an error, but when I use </title> the W3C standard, I can not out put the title in the page html source code.

    And only use the uncorrected tag </title />, it become effective. Where is the problem? Is it setting in filter.php or function,php I can not find the problem.



    Forum Moderator

    can you post a link to your site, and state if you have used </title /> or </title> ?

    @alchymyth, I can post a link to my site, but I can not add title, even some simple word <title>example</title>, if I add some thing like </title>, the meta:title will disappear in page html source code.

    BTW: in theme function.php, I remove something

    define( 'BP_SILENCE_THEME_NOTICE', true );
    remove_action('wp_head','adjacent_posts_rel_link_wp_head', 10, 0 );

    devil, solve it.

    in wp-includes/formatting.php, find the line

    // Remove metadata tags
    $content = preg_replace('/<title>(.+?)<\/title>/','',$content);

    remove this line, then the title is back to my page html source code. Waste a few hours, for this fool behave.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] why meta:title need “ at the end??’ is closed to new replies.
Skip to toolbar