Fixing duplication in HTML title element for WordPress with Yoast SEO installed

I was having a problem in WordPress for my blog where the title contained duplicate values, like “John’s blogJohn’s blog”.

The fix for me was to edit wp-content/themes/twentyeleven/header.php and disable a bit of the output, as shown below. I basically just added an if ( false ) to disable the code which caused the duplicate content.

This seems to effectively mean that Yoast SEO is in charge of the titles now. You can configure separately the homepage, posts, and pages titles in the Yoast SEO settings. I configure mine in Yoast SEO Settings / Content Types like this:

Homepage
Site title Separator Tagline
Posts
Title Separator Site title
Pages
Title Separator Site title
<title>
<?php
  // Print the <title> tag based on what is being viewed.
  global $page, $paged;

  wp_title( '|', true, 'right' );

// 2024-07-14 jj5 - OLD: I removed this because wp_title() (above) does everything that needs to be done.
if ( false ) {
  // Add the site name.
  bloginfo( 'name' );

  // Add the site description for the home/front page.
  $site_description = get_bloginfo( 'description', 'display' );
  if ( $site_description && ( is_home() || is_front_page() ) ) {
    echo " | $site_description";
  }

  // Add a page number if necessary:
  if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
    /* translators: %s: Page number. */
    echo esc_html( ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) ) );
  }
}
?>
</title>

New WordPress plugins for the blog

I have been rolling out CloudFront for a few of my domains, including blog.jj5.net.

In order to integrate CloudFront with WordPress I used the W3 Total Cache plugin.

And in order to set the <link rel=”canonical”> element I used the Yoast SEO plugin.

At one point I had a problem with garbled content in my browser. Looked like the browser was trying to display compressed content as text. But now I can’t reproduce, so hopefully whatever the issue was it is now fixed…

Support for OpenID

Was just having a look into what kind of support there was for OpenID in the software that I use, and basically it looks like there is fairly good support. Mailman might be a bit of a trick.

MediaWiki

WordPress

Mailman

FFS WordPress

The famous five minute quick installation, my ass!

Firstly, I’ve just discovered FileZilla, and now I don’t have to upload my files one by one! When I didn’t know about FileZilla and FTP, I used my hosting provider’s web-based interface to upload HTML files to my web-site one-by-one. I’m glad those days are gone!

In the beginning days when I just wrote my own HTML files that was cool, because I only had about 10 files. But now that I’m learning to be a WordPress master I need FTP, and FileZilla rocks! (Thanks to jj5 for the recommendation!)

In the five minute install it said do you have a MySQL server, and I was like “yeah”, but then when I uploaded WordPress it said that my version of MySQL wasn’t high enough! They didn’t tell me *that* in the five minute install instructions!

And now on another one of my WordPress web-sites I have a random error with a stray < character in the wp-settings.php config file and the whole site is broken. I don’t even know who to blame for that!

In conclusion I take my hat off to people who have WordPress sites, because it’s not as easy to get it set up as it says in the manual. You still have to know computers to get it going I guess.