Mobile app version of vmapp.org
Login or Join
Tiffany637

: A good way to use RDFa in a WordPress post I'm using the RDFa on the breadcrumbs, and this is the scheme of my code in a post: <div class="path" vocab="http://rdfa.data-vocabulary.org/#">

@Tiffany637

Posted in: #Rdfa #Wordpress

I'm using the RDFa on the breadcrumbs, and this is the scheme of my code in a post:

<div class="path" vocab="http://rdfa.data-vocabulary.org/#">
<span id="breadex">You are here: </span>

<span typeof="v:Breadcrumb"><!--This is the home link-->
<a title="Title" id="breadh" href="#" rel="v:url" property="v:title">Title</a>
</span>

<span typeof="v:Breadcrumb"><!--This is the category link-->
<a title="Category" href="#" rel="v:url" property="v:title">Category</a>
</span>

<span typeof="v:Breadcrumb"><!--This is the subcategory link-->
<a title="Subcategory" href="#" rel="v:url" property="v:title">Subcategory</a>
</span>

<span>This is the title of the post</span><!--This is the title of the post-->
</div>


This scheme at the moment works, 'cause I can see the categories in the Google Search results, the snippet shows the link for each category, so Google is understanding this information.

It is really important to mention this is the way I could make it HTML5 valid. Before I used xmlns instead of vocab, but xmlns is deprecated in HTML+RDFa 1.1. That's the reason I'm using RDFa in this way.

BUT: Google Webmaster Tools shows me an error, now, when before, using xmlns it worked perfect without errors. This is the error Google shows for every single post URL:


Missing: author

Missing: entry-title

Missing: updated


So in a website where I have 26 posts, I have this triple error 26 times on GWT, specifically in the section «Structured Data». The next step I did was to check this information in the «Google Structured Data Testing Tool»: www.google.com/webmasters/tools/richsnippets
And it shows «Structured data extract»: hatom-feed, hatom-entry... Everything is ok and at the end, in red color:


Error: Missing required field "entry-title".

Error: Missing required field "updated".

Error: Missing required hCard "author".


Then it shows the rdfa-node with the correct information. I'm using Open Graph, so in this case it's taken from the Open Graph meta tags.

So well, my questions are:

In order to fix this error, should I add more RDFa in every post? For example, I can add the author where I print the author of the post, like here:


December 29, 2013 by admin in Category


Is the «updated» field the date of the post?

How should I indicate the «entry-title»?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Tiffany637

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ogunnowo487

The three errors (missing entry-title/updated/author) are not about your RDFa, but about Microformats.

Your article element has the hentry class which is used by the hEntry Microformat. This Microformat requires the classes entry-title, updated, and author.

You are also using the tag link type (aka. rel-tag Microformat), and because they are children of the hentry, Google SDTT interprets that these tags belong to the hEntry instance; these are shown in Google’s SDTT under "hatom-feed → hatom-entry".

If you don’t want to use the hEntry Microformat, simply remove the hentry class.



Side note about your RDFa: You are specifying a vocab, but you are still using prefixes for the vocabulary terms. It’s not an error, but the vocab will be ignored in your case. As explained in my answer to your other question, you have three options to specify the vocabulary:

Using vocab:

<div vocab="http://rdfa.data-vocabulary.org/#">
<span typeof="Breadcrumb"></span> <!-- without "v:", because you are using "vocab" (= default vocabulary URI) -->
</div>


Using prefix:

<div prefix="v: rdfa.data-vocabulary.org/# >
<span typeof="v:Breadcrumb"></span> <!-- with "v:", as defined in "prefix" -->
</div>


Using nothing (relying on RDFa Core Initial Context):

<div>
<span typeof="v:Breadcrumb"></span> <!-- with "v:", as defined by the W3C in the Initial Context -->
</div>

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme