Support » Plugin: Head Cleaner » wp_title vs get_the_title in _get_ogp_tags

  • Hi.

    Head Cleaner appends my blog name to the title in og:title. I think that happens because my theme supports ‘title-tag’.

    If I change the line
    $title = trim(wp_title(”, false));
    to
    $title = trim(get_the_title());
    I get the title without my blog name applied.

    Not sure if this is the right way to fix the problem, but it works for me.

    https://wordpress.org/plugins/head-cleaner/

  • The topic ‘wp_title vs get_the_title in _get_ogp_tags’ is closed to new replies.