200spins

Ever since Google introduced its rich snippets, webmaster and bloggers alike have been tearing their hair out trying to make their sites compliant. I know, because I’ve seen how many people are Googling rich snippets, hoping that Google can solve the problem that they started in the first place. Unfortunately it seems a lot of them aren’t finding a solution to their problem.

At least this post will fix rich snippets for Flexsqueeze owners. So why all the fuss?

According to Google….

 

Adding structured data to pages on your site helps Google’s algorithms understand their content and index them better. The structured data gathered from your site can be used to improve the page’s search entry, for example, to generate rich snippets, which provide an improved page summary in our search results. There are several ways that you can add structured data to your web pages: by adding markup to your pages, using Data Highlighter, or using Google’s Merchant Center.

Even though Google tries to help us by giving examples, because of all the different themes and platforms out there these examples just seem to drive us batty. Why is it working for everyone else and not for us?

I’ve never worried about it until I started my Sports Betting blog. I want that blog to do really well and that means, as much as it pains me, I have to do all I can to please Google. That meant getting the ‘rich snippets’ to appear correctly on all my pages. It was simple enough to get the ‘authorship’ part to work so that my image appears in the search engines.

rich snippets

All I had to do for that was to add the following code….

<a rel=”author” href=”https://plus.google.com/105130553592815175528″>About Peter Pelliccia</a>

…. into the ‘footer script’ part of Flexsqueeze theme options found in the Analytics/Javascript/Favicon menu.

The problem was, even though everything else was working fine I was getting the following errors. 

Error: Missing required field “entry-title”.

Error: Missing required field “updated”.

Error: Missing required hCard “author”.

It took me ages to fix them all but now that I have I want to share it with all the other Flexsqueeze owners who may be having problems with their rich snippets.

How To Fix Rich Snippets On Flexsqueeze

In the WordPress Dashboard go to Appearance and then click on editor at the bottom of the selection. The first file we want to edit is the Single Post (single.php). Find the following bit of code….

<h1><?php the_title(); ?></h1> <?php if (get_option('flex_metadata_show') == "yes") { ?> <div class="postMeta"> <div class="postdate"> <?php the_time('l, F jS, Y') ?> at <?php the_time() ?> &nbsp; <?php edit_post_link('Edit'); ?> </div>

 

We need to change that to;

<h1 class="title single-title entry-title"><?php the_title(); ?></h1> <?php if (get_option('flex_metadata_show') == "yes") { ?> <div class="postMeta"> <div class="postdate date updated"> <?php the_time('l, F jS, Y') ?> at <?php the_time() ?> by <span class="vcard author"><span class="fn"><?php the_author(); ?></span></span> &nbsp; <?php edit_post_link('Edit'); ?> </div>

We will also need resolve this issue in the by fixing the Archives (archive.php).We need to change the following code. 

<h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="postMeta"> <?php if (get_option('flex_metadata_show') == "yes") { ?> <div class="postdate"> <?php the_time('l, F jS, Y') ?> at <?php the_time() ?> &nbsp; <?php edit_post_link('Edit'); ?> </div>

so it looks like the following.

<h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark" class="title single-title entry-title"><?php the_title(); ?></a></h2> <div class="postMeta"> <?php if (get_option('flex_metadata_show') == "yes") { ?> <div class="postdate date updated"> <?php the_time('l, F jS, Y') ?> at <?php the_time() ?> by <span class="vcard author"><span class="fn"><?php the_author(); ?></span></span> &nbsp; <?php edit_post_link('Edit'); ?> </div> 

Finally we have to change the code that’s found in the Main Index Template (index.php)

<h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="postMeta"> <?php if (get_option('flex_metadata_show') == "yes") { ?> <div class="postdate"> <?php the_time('l, F jS, Y') ?> at <?php the_time() ?> &nbsp; <?php edit_post_link('Edit'); ?> </div>

We need to adjust that bit of code so that it looks like this.

<h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark" class="title single-title entry-title"><?php the_title(); ?></a></h2> <div class="postMeta"> <?php if (get_option('flex_metadata_show') == "yes") { ?> <div class="postdate date updated"> <?php the_time('l, F jS, Y') ?> at <?php the_time() ?> by <span class="vcard author"><span class="fn"><?php the_author(); ?></span></span> &nbsp; <?php edit_post_link('Edit'); ?> </div>

 

I’ve actually produced a video which you can see below. This video shows step by step how to edit each file so that you also can become rich snippet compliant. It’s also kind of nice to see your photo in the search engines. Naturally all of this will be in vain unless you have a Google + profile. The following link will show you what Google requires from you.

WordPress Tutorial How To Fix Rich Snippets

I hope this post helped you and if it did don’t forget to share with your mates.

Digiprove sealCopyright secured by Digiprove © 2014
Previous Post

Vicar Sexy Sal Blonde Joke Friday Funnies #120

 This weeks Friday Funnies is all about a small town who just love their Vicar ... Read more

Next Post

Creating An Online Shopping Outlet

Creating An Online Shopping OutletBusinesses need to learn more about creating online shopping centers before ... Read more

Sharing is CoolShare on Facebook1Share on Google+2Tweet about this on Twitter0Share on LinkedIn0Pin on Pinterest0Share on StumbleUpon17

Tagged with:

Filed under: WordPress Tutorial

Like this post? Subscribe to my RSS feed and get loads more!