Schema Help
-
Hello,
firstly thank you so much for such a great theme and plugin.
i am facing a problem that i need your help with.I can see your theme/plugin reviews schema work with the reviews posted. however i am not showing or publishing any kind of reviews but i want to send data to schema from custom field.
I see the code wp-content/plugins/geodiro/includes/class-geodir-post-data.php from line 2179 to 2189.if ( $gd_post->overall_rating ) { $schema['aggregateRating'] = array( "@type" => "AggregateRating", "ratingValue" => $gd_post->overall_rating, "bestRating" => "5", // @todo this will need to be filtered for review manager if user changes the score. "worstRating" => "1", "ratingCount" => $gd_post->rating_count, ); }I have actually got my goal and successfully sending the data by small changes in code as follows
if ( $gd_post->overall_rating ) { $schema['aggregateRating'] = array( "@type" => "AggregateRating", "ratingValue" => $gd_post->rrating, "bestRating" => "5", // @todo this will need to be filtered for review manager if user changes the score. "worstRating" => "1", "ratingCount" => $gd_post->rcount, ); }the problem i am facing is that whenever gerdirectory plugin update come. it delete the modified code and replace with original.
is there any way to do it with function.php of the theme. because i already have child theme or something else.
i don’t want to lose plugin updates too because those are very important. and i can see you guys made very big improvements.
hope to hear from you soon.
kind regrds
The topic ‘Schema Help’ is closed to new replies.