• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Add “itemReviewed” in WP-postratings plugin

Community Beginner ,
Dec 17, 2019 Dec 17, 2019

Copy link to clipboard

Copied

I want to configure the markup of Reviews on the site, which will be displayed in the fragment of the search engine stars and the author of the review.

CMS site: WordPress 5.3 - Astra theme I use the plugin: WP-Postrating (https://wordpress.org/plugins/wp-postratings/)

1. changed the type of markup in function.php using the filter as described in the plugin instructions:

 

add_filter( 'wp_postratings_schema_itemtype', 'wp_postratings_schema_itemtype' );
function wp_postratings_schema_itemtype( $itemtype ) {
return 'itemscope itemtype';
}


Markup is now defined as Review https://search.google.com/structured-data/testing-tool#url=%20https%3A%2F%2Fimprovecraft.com%2Fbest-... Article: https://improvecraft.com/best-vinyl-cutters/

But because of an error: you need to specify a value for the itemReviewed field.

Stars and the author are not displayed in the search system fragment.

Please give us a hint. What code should I add to function.php to add this field? And what would you like to see in this field, for example, the title of an article or manually fill in itemReviewed. You may need to add some special field to the article editor.

I would be very grateful. The employer wants to do this, I am a novice developer

at https://improvecraft.com/

TOPICS
Code , Error , How to , Interface , Other

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 17, 2019 Dec 17, 2019

Copy link to clipboard

Copied

This is not a Dreamweaver question so much as a WP plugin question. Did you reference the post/page ID? See link below for examples.

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

 

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 18, 2019 Dec 18, 2019

Copy link to clipboard

Copied

LATEST

I ask here because programmers use Dreamweaver, and they cannot help me in other forums.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines