Tagged: Markup, structured data
Hi,
By default the structured data set for my website is itemtype=”https://schema.org/Blog”. In one of my posts i reviewed a product and for that, i needed to manually add <div itemscope=”” itemtype=”http://schema.org/Review”>, however when i checked with google structured data testing, i realized that now i have both “blog” and “review” as my structured data which is not what i wish to have, i just need to show the review . So, the question is how i can remove the “blog” for each page and have only my own manually inserted structured data ?
Regards,
Arash
Hey A_Niloo!
Thank you for using Enfold.
I’m not exactly sure what you’re trying to do here but if you want to modify the schema.org markup, you can use the “avf_markup_helper_attributes” filter. Example here:
add_filter('avf_markup_helper_attributes', 'avf_markup_helper_attributes_modified', 10, 2);
function avf_markup_helper_attributes_modified($attributes, $args) {
if($args['context'] == 'entry_time') {
$attributes['itemprop'] = 'dateModified';
$attributes['datetime'] = get_the_time('c');
}
return $attributes;
}
Look for the includes > helper-markup.php file for reference.
Cheers!
Ismael