Highlighted

Add “itemReviewed” in WP-postratings plugin

Community Beginner ,
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

429

Likes

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

Add “itemReviewed” in WP-postratings plugin

Community Beginner ,
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

430

Likes

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
Dec 17, 2019 0
Adobe Community Professional ,
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, ACP
Alt-Web.com

Likes

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
Reply
Loading...
Dec 17, 2019 1
Community Beginner ,
Dec 18, 2019

Copy link to clipboard

Copied

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

Likes

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
Reply
Loading...
Dec 18, 2019 0