Could someone help me with some basic PHP?

PotePipote

Member
Jun 22, 2019
72
29
18
Venezuela
Hello Babiato team.
I come to you again hoping to solve a problem with the rich snipped rating.

I have switched from the Stellar plugin to YASR (Yet Another Stars Rating) because unfortunately it is not fully adapted to the Google guidelines to show the SERP rating.

The plugin works perfectly, google understands and shows the rating, now I find a new problem, YARS applies schemas in my pages like Rank Math and duplicate content is generated and not only this, also the fields of the recipe schema of YARS are not complete like Rank Math is.

What I want to achieve is to deactivate the YARS schema to be able to implement only the Rank Math for this on the official website they told me that I have to implement the
PHP:
yasr_filter_existing_schema
hook but they did not provide me with more information, unfortunately I do not know PHP or where to place this code.

If you could help me, this would be great as it would get exactly what I need for my website, thank you very much in advance.
 

videva

Member
Aug 25, 2020
75
53
18
Hello Babiato team.
I come to you again hoping to solve a problem with the rich snipped rating.

I have switched from the Stellar plugin to YASR (Yet Another Stars Rating) because unfortunately it is not fully adapted to the Google guidelines to show the SERP rating.

The plugin works perfectly, google understands and shows the rating, now I find a new problem, YARS applies schemas in my pages like Rank Math and duplicate content is generated and not only this, also the fields of the recipe schema of YARS are not complete like Rank Math is.

What I want to achieve is to deactivate the YARS schema to be able to implement only the Rank Math for this on the official website they told me that I have to implement the
PHP:
yasr_filter_existing_schema
hook but they did not provide me with more information, unfortunately I do not know PHP or where to place this code.

If you could help me, this would be great as it would get exactly what I need for my website, thank you very much in advance.

PHP:
//put this to functions.php on your theme
add_filter( 'yasr_filter_existing_schema', '__return_false' );
add_filter( 'yasr_filter_schema_jsonld', '__return_false' );  // to remove jsonld schema
 
Last edited:
  • Like
Reactions: PotePipote

PotePipote

Member
Jun 22, 2019
72
29
18
Venezuela
PHP:
//put this to functions.php on your theme
add_filter( 'yasr_filter_existing_schema', '__return_false' );
add_filter( 'yasr_filter_schema_jsonld', '__return_false' );  // to remove jsonld schema

Thank you, seriously it's what I needed, a hug.
 

Forum statistics

Threads
69,498
Messages
910,045
Members
239,974
Latest member
geozinho

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu