Share

Do you have lots of Missing: author, Missing: entry-title or Missing: updated errors in Google’s WebMaster Tools?

Add this code to your functions.php and it should fix most of them. Read the ‘Set Up’ at the bottom of the article as there is also an addition to your template needed.

The Code

[adrotator]

Set Up

Once you have copied the code above to your functions.php, all your single post webpages should have the missing structured data tags automatically added.

Now to fix the errors on your archive web pages, you need to add a line of code to your template(s). I’ll try and explain the steps, but the exact method depends on your theme.

Find archive.php in your parent theme directory or your child theme directory. (If you don’t have a child theme – Stop this and make one)

Open archive.php in your text reader or editor.

Look for the start of ‘the loop’ –

Have a look at the code following that and before the ‘endwhile’ command. See if there is a ‘get_template_part’ command something like this (the stuff inside the parenthesis might be different):

Follow ONE only!


I have a get_template_part command:

In this case, look at the first parameter in the parenthesis – ‘content’. This relates to another template file called content.php. It is probably used in other post archives in your theme, maybe on your front page or categories etc.

You want to now copy that file from your parent theme directory to your child theme directory (don’t overwrite it if it already exists)

Open the copied or existing child file in your text editor. Find the opening <div> for the post. It’s a line beginning something close to:  <div id=”post-.

Somewhere after that opening <div> and before it is closed, paste this code on its own line:

Save the file and this should correct the errors for all of your archive pages in one fell swoop. 🙂


I don’t have a get_template_part command:

Copy archive.php from your parent theme directory to your child theme directory (don’t overwrite it if it already exists!). Open in your text editor and find the start of the loop again:

Somewhere after that you should find the opening <div> for the post. It’s a line beginning something close to:  <div id=”post-.

Somewhere after that opening <div> and before it is closed, paste this code on its own line:

Save the file and this should correct your errors. If your theme has other pages that show archives, e.g. front page or categories, you will have to repeat this procedure for each archive template (index.php or home.php possibly).


Share