• Resolved youlichika

    (@youlichika)


    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 www.remarpro.com, 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)
  • this was an error in the Codex; and is now corrected.

    https://www.w3schools.com/tags/tag_title.asp

    Thread Starter youlichika

    (@youlichika)

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

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

    Thread Starter youlichika

    (@youlichika)

    @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','rsd_link');
    remove_action('wp_head','feed_links_extra',3);
    remove_action('wp_head','feed_links',2);
    remove_action('wp_head','wlwmanifest_link');
    remove_action('wp_head','index_rel_link');
    remove_action('wp_head','wp_generator');
    remove_action('wp_head','adjacent_posts_rel_link_wp_head', 10, 0 );
    remove_action('wp_head','wp_generator');
    remove_action('wp_head','parent_post_rel_link');
    remove_action('wp_head','start_post_rel_link');
    remove_action('wp_head','adjacent_posts_rel_link');
    Thread Starter youlichika

    (@youlichika)

    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 ‘why meta:title need “ at the end??’ is closed to new replies.