DoESLiverpool/somebody-should

DoES website preview shows title as “HomeIan”.

Closed this issue · 3 comments

I sent the does website to someone by iMessage and it gave the title as HomeIan. Not sure why. Would be good to have something more useful. I shared https://doesliverpool.com/

image

It's actually HomeIan (ian with a capital I) not Homelan. I can see the tag that's causing it but can't for the life of me figure out how to change it in the Wordpress interface:

<meta property="og:title" content="HomeIan"/>

Maybe @willcrobinson can help?

For some reason, the home page itself was named "HomeIan":

Screenshot 2024-02-02 at 10 35 01

I’ve now changed it back to "Home".

But really, we should dig into why that <meta property="og:title"> tag is being output at all at the top of the page, and remove it, because crawlers are preferring that over the proper <meta property="og:title"> tag that YoastSEO inserts (along with all the other social tags) a few lines further down the template.

Ah, ok, I’ve dug around a bit. Our site uses a child theme that inherits from a commercial theme called Nomad Progression. Nomad Progression includes the folllowing at the top of every page:

<?php if(is_page() || is_single() ): ?>
    <meta property="og:title" content="<?php the_title(); ?>" />
    <meta property="og:site_name" content="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" />
    <?php if (has_post_thumbnail( $post->ID ) ): ?><?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'progression-blog' ); ?>
        <meta name="twitter:image" content="<?php echo esc_attr($image[0]);?>" />
        <meta property="og:image" content="<?php echo esc_attr($image[0]);?>" />
        <meta property="og:image:secure_url" content="<?php echo esc_attr($image[0]);?>" />
    <?php endif; ?>
<?php endif; ?>

I’ve customised our theme to prevent it including this part of the parent theme, because we have YoastSEO installed, and so want that to be managing all the social tags, not the theme.