[Support request] How to disable schema?

Home Forums Support [Support request] How to disable schema?

Home Forums Support How to disable schema?

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #410510
    Pascal

    Hi
    I use a plugin for that and I need that GP do not include it’s own schema.
    I have read a lot of post about that here, but they are old.
    I have also read that in the last version it will be possible to completly remove it, so… how ?
    Thanks

    #410782
    Tom
    Lead Developer
    Lead Developer

    Currently it’s only possible to remove it from the body and article elements. In a future version (not the next one, but soon), it will be possible to edit the attributes of every element.

    For now, the other topics you found are likely still the answer.

    Let me know if you need more info πŸ™‚

    #411274
    Pascal

    Ok πŸ™‚

    I have seen 2 methods, which one works please?

    #1
    if ( ! function_exists( 'generate_body_schema' ) ) :
    function generate_body_schema()
    {
    	echo '';
    }
    endif;
    
    if ( ! function_exists( 'generate_article_schema' ) ) :
    function generate_article_schema( $type = 'CreativeWork' )
    {
    	echo '';
    }
    endif;

    #2

    add_filter( 'generate_article_schema', 'example_function_name' );
    function example_function_name()
    { 
        return '';
    }
    add_filter( 'generate_body_schema', 'example_function_name2' );
    function example_function_name2()
    { 
        return '';
    }
    #411441
    Tom
    Lead Developer
    Lead Developer

    #2 is the way to go πŸ™‚

    #566359
    mirko

    How to write the function #2 to remove all the generatepress schema?
    For example “creativework” or “wpheader” ?
    Thanks!

    #566649
    Tom
    Lead Developer
    Lead Developer

    It’s not possible right now. However, having that microdata doesn’t harm your site, even if you go with something like JSON-LD instead.

    In GP 2.2 we will be introducing an attribute system that will allow us to remove all schema if needed.

    #572073
    Pascal

    Hi Tom

    GP 2.2 sounds far away as we only are at 2.1.1 πŸ™

    Maybe microdata do not harm our sites, but it’s not clean, and confusing, to have a ton of different entry while using the Google structured data testing tool…

    Thanks

    #572528
    Tom
    Lead Developer
    Lead Developer

    2.2 is the next feature release. We follow semantic versioning: https://semver.org/

    #572957
    Pascal

    Oh sorry Tom… but it’s a good news πŸ™‚

    #604919
    DIMO Software

    Hi

    Any news about this 2.2 please ?

    I’m using GP 2.1.2 and GP Premium 1.6.2

    Thanks

    #604957
    Leo
    Staff
    Customer Support

    It’s on the way but will be take a bit longer still.

    Thanks for your patience πŸ™‚

    #614857
    Pascal

    Hello

    My first question was on October 26, 2017 and I was hopping to read news about it in the last version GeneratePress 2.1.3, but not… πŸ™

    Thanks

    #615368
    Tom
    Lead Developer
    Lead Developer

    Not yet, but GP 2.2 will have the new attribute system in place that will make this possible.

    #615694
    Pascal

    Yes Tom I know πŸ™‚ the big questions is when…?
    Thanks

    #615737
    Tom
    Lead Developer
    Lead Developer

    There’s no concrete date yet. It will likely be in August sometime.

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