I’m using “NewsArticle” Schema and want to remove or disable the theme default “Article” schema. can anyone please tell me the location of the “Article” schema? Thank you…
I’m using this in functions.php but not working
// Disable item scope meta by overriding the functions
if (!function_exists(‘get_item_scope_meta’)) {
function get_item_scope_meta() {
return ”; // Return an empty string to disable schema output
}
}
if (!function_exists(‘show_item_scope_meta’)) {
function show_item_scope_meta() {
echo ”; // Echo an empty string to disable schema output
}
}
// Ensure the functions are not called by the theme
remove_action(‘wp_head’, ‘show_item_scope_meta’);
Hello!
If you want to disable the article schema from the theme, then here is the option: https://app.screencast.com/tIYpP04owmJF7
Thank you!
using this code to get logo in NewsArticle schema but not working // Fetch logo URL
$logo_id = get_theme_mod(‘custom_logo’);
$logo_data = wp_get_attachment_image_src($logo_id, ‘full’);
$publisher_logo = $logo_data ? $logo_data[0] : ”;
And using this code for Subtitle but not working // Get subheadline (Subtitle)
$subheadline = get_post_meta($post->ID, ‘Subtitle’, true);
Hello!
For customization and other services, you can contact our custom work team here: https://tagdiv.com/premium-customization-services/.
Thank you!