WordPress.org

Forums

WP-PostRatings
[resolved] Rich Snippets not showing up (7 posts)

  1. hatishbi
    Member
    Posted 10 months ago #

    Hi,

    first of all, thanks for all the work you're investing in this great plugin. It works like a charm at my site, except for the google part (which is really important for me). The rich snippet tool is showing some information generated by the plugin (schema.org/aggregaterating) but no stars / review information at all.
    What to do? Thanks,

    Bye
    Johannes

    https://wordpress.org/plugins/wp-postratings/

  2. Lester Chan
    Member
    Plugin Author

    Posted 10 months ago #

    I am not sure on that, from the plugin point of view it works since Google manages to detect the ratings

    type:	http://schema.org/aggregaterating
    property:
    bestrating:	5
    ratingvalue:	4.75
    ratingcount:	4

    I am guessing some plugins or your theme is breaking it

    Extrahierte strukturierte Daten
    hatom-feed
    hatom-entry:
    entry-title:	Kostenlose Hörbücher und Hörspiele
    Fehler: Missing required field "updated".
    Fehler: Missing required hCard "author".
  3. hatishbi
    Member
    Posted 10 months ago #

    Thanks for the quick reply. I'm aware of this (missing tags in the hatom-feed declaration, see here) but this is not causing the missing stars. I have the same error in postings and here the stars are shown, see here. If you compare the posting (where the plugin works) and the page (where it doesn't) you see that the whole "Item type: http://schema.org/article" complex is missing where the "Item 1" (aggregaterating) is refered. You know why?
    Thanks again,

    Bye
    Johannes

  4. Lester Chan
    Member
    Plugin Author

    Posted 10 months ago #

    Sorry I am not sure because I am not the expert in this area. but the second link you pasted doesn't contain the error in your first link. So you might want to fix it first to see if it works.

  5. hatishbi
    Member
    Posted 10 months ago #

    I fixed the errors (see here) but the stars still not showing up. Now what?
    Thanks again for your help,

    Bye
    Johannes

  6. Lester Chan
    Member
    Plugin Author

    Posted 10 months ago #

    Sorry I have no idea, but what you mentioned in the previous post is correct, the Item type: http://schema.org/article is missing for the article that doesn't work.

    I am not too sure why that happens, I wonder is it because of a missing or breaking HTML before the parsing of the tags.

    Anyway, I will leave it open to see if others can help because I have no idea why it happens in your case.

  7. hatishbi
    Member
    Posted 10 months ago #

    I've fixed it. In wp-postratings.php i've found

    if(is_single())
    $attributes = 'id="post-ratings-'.$ratings_id.'" class="post-ratings" itemscope itemtype="http://schema.org/Article"';
    else
    $attributes = 'id="post-ratings-'.$ratings_id.'" class="post-ratings"';

    I added the article part to the else function, now it's perfect (unless i broke something else ;), stars are showing up on pages.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.