[Resolved] Remove Schema create by GeneratePress

Home Forums Support [Resolved] Remove Schema create by GeneratePress

Home Forums Support Remove Schema create by GeneratePress

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1399624
    JORGE

    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!

    #1399630
    Leo
    Staff
    Customer Support

    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 πŸ™‚

    #1412989
    JORGE

    Hi, yes please.

    #1415729
    Kumar

    can you please notify me too… Thank Kumar.

    #1428454
    Leo
    Staff
    Customer Support

    3.0 has just been released for alpha testing:
    https://generatepress.com/generatepress-3-0-a-new-era/

    Thanks for your patience!

    #1491200
    JORGE

    Hi, sorry i already updated to the new version but I still don’t see how I can remove that schema

    #1491228
    Leo
    Staff
    Customer Support
    #1491957
    JORGE
    #1492323
    Tom
    Lead Developer
    Lead Developer

    That’s being added using JSON-LD – it’s likely coming from an SEO plugin you have activated.

    #1492433
    JORGE

    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

    #1493495
    Tom
    Lead Developer
    Lead Developer

    Which page can I see those on?

    #1496933
    JORGE
    #1497627
    Tom
    Lead Developer
    Lead Developer

    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 πŸ™‚

    #1497743
    JORGE

    It works very well, thanks a lot!

    #1498621
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.