Google Search Console Microdata

When running a site through Search Console, Google started crying and complaining that I didn’t have author or date micro data.  Boo frickin’ hoo! 😉

Anywho I search for a while, tried a few things and found this code that fixes it:

Add this to your functions.php in your CHILD theme (you better be using a child theme, mister!)

//code to make google search console happy about microdata
function add_atom_data($content) {
$t = get_the_modified_time('F jS, Y');
$author = get_the_author();
$title = get_the_title();
if (is_home() || is_singular() || is_archive() ) {
$content .= '<div class="hatom-extra" style="display:none;visibility:hidden;"><span class="entry-title">'.$title.'</span> was last modified: <span class="updated"> '.$t.'</span> by <span class="author vcard"><span class="fn">'.$author.'</span></span></div>';
return $content;
add_filter('the_content', 'add_atom_data');

It’s here:


A Good .htaccess File

I’m a bit new to this side of things but for now this is the .htaccess file I’m using when I want everything to point back to

EDIT: I updated on 5/20/13 and 8/15/13 to add several options that can be removed.

RewriteEngine on

# Proper 404
ErrorDocument 404 /404.php
# 301 Redirects of old page names
RedirectPermanent /old-page.php

# Force index.php to go to root
RewriteCond %{THE_REQUEST} ^.*/index.php 
RewriteRule ^(.*)index.php$$1 [R=301,L] 

# Force www
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^(.*)$$1 [R=301]

# Allow with or without PHP extension
RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.php [NC,L]

# Force trailing slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$$1/ [R=301,L]

Also I should have figured this out years ago but I shouldn’t just reference index.php and the like in an href, do it up right with the full URL

Converting a site to WP but doing the right SEO stuff

Mainly what you have to do is:

  1. Convert the site to WP
  2. Once all is good with WP edit .htaccess
  3. Above all the wordpress stuff you have to add this type of thing: Redirect 301 /myoldurl.html
  4. You have to add that for each old file that you want to redirect to the new file
  5. There is info all over the net, including here:

301 Redirect and Canonicalization

This is a bit web design related and a bit SEO related but basically watch this video:,or.r_gc.r_pw.r_cp.,cf.osb&fp=cb0215ac689da41e&biw=1089&bih=1024

Then check these sites on how to fix it.