Archived topic
Remove Schema create by GeneratePress
14 replies · Started by JORGE on August 12, 2020
Hi, i need to delete the schema created by the theme
"Hatom"-"Hcard"-"SiteNavigationElement"-"Person"

Is there a way to delete it? Thanks a lot!
Hi there,
It's not possible right now but we've added a filter in the next version GeneratePress 3.0 for this.
The alpha should be released in the near future.
Can I notify you in this post when it's ready to be tested?
Thanks :)
Hi, yes please.
can you please notify me too... Thank Kumar.
3.0 has just been released for alpha testing:
https://generatepress.com/generatepress-3-0-a-new-era/
Thanks for your patience!
Hi, sorry i already updated to the new version but I still don't see how I can remove that schema
Hi, I'm already using them but it doesn't work.


That's being added using JSON-LD - it's likely coming from an SEO plugin you have activated.
Sorry, you're right, I already fixed it, but "Person" and "Vcard" if generated with GeneratePress, Haton was removed with the solution you suggested. Only "Person" and "Vcard" remain
Which page can I see those on?
Try adding this:
add_filter( 'generate_page_hero_post_date', function() {
$time_string = '<time class="entry-date published">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="updated">%4$s</time>' . $time_string;
}
$time_string = sprintf(
$time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( 'c' ) ),
esc_html( get_the_modified_date() )
);
return $time_string;
} );
add_filter( 'generate_page_hero_post_author', function() {
global $post;
$author_id = $post->post_author;
$author = sprintf(
'<span class="author"><a href="%1$s" title="%2$s"><span class="author-name">%3$s</span></a></span>',
esc_url( get_author_posts_url( $author_id ) ),
/* translators: author name */
esc_attr( sprintf( __( 'View all posts by %s', 'gp-premium' ), get_the_author_meta( 'display_name', $author_id ) ) ),
esc_html( get_the_author_meta( 'display_name', $author_id ) )
);
return $author;
} );
Let me know :)
It works very well, thanks a lot!
You're welcome :)