Plugin Contributor
dudo
(@dudo)
Hello!
Most probably, in the editor screen you selected “yes” to “Is this a review?” field.
That field will exclude aggregateRating.
You can find more info here https://yetanotherstarsrating.com/docs/rich-snippet/reviewrating-and-aggregaterating/
Thread Starter
krpzzr
(@karapuzzer)
Thanks for answer!
I choose “Is this a review ? NO” on all pages.
for example https://prnt.sc/t7w3s7 this http://credit24.su/zaymer/
schema.org doesn’t work on all pages except news (I checked on the main page, it doesn’t work there either)
On all pages I choose answer “Is this a review? NO”
This is homepage https://prnt.sc/t7w84c
On all pages I use shortcode in .php files – <?php echo do_shortcode('[yasr_visitor_votes]'); ?>
-
This reply was modified 5 years, 11 months ago by
krpzzr.
-
This reply was modified 5 years, 11 months ago by
krpzzr.
Plugin Contributor
dudo
(@dudo)
I think I’ve understand what is going on:
This happens because YASR inject schema.org microdata only if both condition is_singular and is_main_query are true; this is to be sure that we are in a single post page, and not (for example) in an archive page, where this kind of microdata are useless
Thread Starter
krpzzr
(@karapuzzer)
Thanks for the answer!
Do you have any advice on how to inject YASR schema.org microdata to these types of pages http://credit24.su/zaymer/ ?
Only change the code of your plugin?
Plugin Contributor
dudo
(@dudo)
Thread Starter
krpzzr
(@karapuzzer)
I also comment 129, 133 and 160 lines but it didn’t help
https://prnt.sc/t9eqot
I try to “debug” your function yasr_add_schema on 125 line by calling print: "foo" on 132 line and I don’t see nothing but when open single news page the “foo” was print over the header
-
This reply was modified 5 years, 11 months ago by
krpzzr.
-
This reply was modified 5 years, 11 months ago by
krpzzr.
Thread Starter
krpzzr
(@karapuzzer)
Thanks for help!
I fix this calling <?php the_content(); ?> in my file with html
https://wordpress.stackexchange.com/questions/145062/add-filter-the-content-in-functions-php-not-working
-
This reply was modified 5 years, 11 months ago by
krpzzr.
-
This reply was modified 5 years, 11 months ago by
krpzzr.