1

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»: http://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»?

  • Could you link to an example page with the full markup (or if you don’t want to publish it, just the markup without content, e.g., on pastebin.com)? -- It seems that, at least some, errors are about Microformats (and not about the RDFa you use). – unor Jul 20 '14 at 14:15
  • 1
    Yes, you can see this example: astrosigma.com/marte. I designed this WordPress theme from 0 -- so probably it has more mistakes. It's strange if Google returns errors about Microformats, 'cause I think I'm not using them. – Gerard Jul 20 '14 at 15:43
0

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: http://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>
  • Awesome answer! Thank you! I will try the faster solution, using prefix: I only need to add the v: in the first div. About the Microformats, the hentry class is added automatically by the WordPress function post_class(). I will think about if I remove it using a filter or if I add the three requirements. Thank you a lot! ;) – Gerard Jul 20 '14 at 17:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.