• Resolved Paul

    (@pbgeneral)


    Looking at the code of pages where I have review boxes, I notice that there is a huge block of code under the affiliate button. It basically pastes ALL of the content of the page, and it starts with:

    <script type=”application/ld+json”>

    Why is this here? I’m concerned that it might be affecting my SEO, in part because it’s basically just duplicating the text in the actual content.

    You can see an example of it in the linked page.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor contactashish13

    (@rozroz)

    Thread Starter Paul

    (@pbgeneral)

    Ok, but what I’m asking is: why does your Schema code duplicate the entire body? I don’t see this in other Schema review code, and it seems bloated and unnecessary.

    • This reply was modified 6 years, 7 months ago by Paul.
    Plugin Contributor contactashish13

    (@rozroz)

    @pbgeneral I’m not sure which other schema review code you are referring to but our plugin gives you the option of filling in all the schema-related values depending on your review type (http://prnt.sc/pal21s). Please provide an example of a non-bloated schema review code so that we can understand your concern.

    Thread Starter Paul

    (@pbgeneral)

    It’s the product type, and I didn’t think you could change that. This has to do with the WP Product Review plugin.

    I’m talking about the “description” and “reviewBody” items in the JSON structured data — more specifically, the body. The entire page is written there, and I want to know if this is necessary or not.

    For example, if I write a 4000-word review, the entire 4000-word post will be duplicated inside the structured data.

    All I want is to have simple snippets for reviews so that star ratings will show up in search engine results. If the “description” and “reviewBody” items aren’t necessary for this, then I don’t want them there, because it’s a bunch of unnecessary bloat in the code. I don’t know if it would affect SEO or not.

    I’m using the Lite version. You say that I can modify this in the settings? I looked but I can’t find where I can do so.

    • This reply was modified 6 years, 7 months ago by Paul.
    Plugin Contributor contactashish13

    (@rozroz)

    @pbgeneral please refer to https://schema.org/reviewBody about what the schema should contain. If you feel you don’t want this or you want to modify the the final output, you can use the filter wppr_schema as below

    
    add_filter( 'wppr_schema', 'wppr_schema', 10, 1 );
    function wppr_schema( $ld ) {
    // change $ld in whatever fashion.
    return $ld;
    }
    
    Plugin Contributor contactashish13

    (@rozroz)

    Closing this.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘What is this code for?’ is closed to new replies.