-
Hi,
I am having issues with Google showing a date in the meta description for my products. The date displayed comes from the DatePublished for the product reviews. I have removed the dates, but they are still in the product schema. I have tried the DatePublished in the schema with some of the codes your chatbot provides, but they do not work.
Do you know a code that works?
Here are the codes I’ve already tried to remove it with:<add_filter( ‘rank_math/schema/product’, function( $data ) {
if ( isset( $data[‘review’] ) ) {
foreach ( $data[‘review’] as &$review ) {
unset( $review[‘datePublished’] );
}
}
return $data;
});></add_filter( ‘rank_math/schema/woocommerce/review’, function( $review ) {
unset( $review[‘datePublished’] );
return $review;
});>
The ticket ‘Remove DatePublished from reviews in product schema’ is closed to new replies.