• Hello together,

    I have A LOT of old Layouts that were working with the old Display method for the Title. By now I had it in a way that seemed pretty nice for me and it worked.

    Now 4.4 came and kicked me in the balls ??

    My old Title-Tag was empty and a second one created below …. or the second one was there all along, but as the first one was still working i never realized it.

    Be it as it is… I need a little help.

    I have used this for my Title Tag Display:
    <title><?php wp_title( ‘|’, true, ‘right’ ); ?></title>
    <meta name=”DC.Title” content=”<?php wp_title( ‘|’, true, ‘right’ ); ?>”>
    <meta property=”og:site_name” content=”<?php wp_title( ‘|’, true, ‘right’ ); ?>”>
    <meta property=”og:title” content=”<?php wp_title( ‘|’, true, ‘right’ ); ?>”>

    Now with this new Version I do get ONLY
    <title>NEW TITLE</title>

    How can I add the three other ones WITHOUT Plugins and shit?

    Kind regards

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Hook ‘wp_head’ (specify priority 1) and echo out the meta tags you want. Instead of using wp_title(), which is slated for deprecation at some point, try using wp_get_document_title(), which should match whatever text occurs in the new <title> block.

    This code could be placed in functions.php of a child theme, or start a site specific plugin to contain all of your hacks. I know you said no plugins, but this would be YOUR plugin to contain all of your hacks, not other people’s bloated code ??

Viewing 1 replies (of 1 total)
  • The topic ‘Change header.php Title Tag Problem’ is closed to new replies.