Support » Plugin: Yoast SEO » How to remove filter json-ld only on specific page?

  • Resolved filoveg

    (@filoveg)


    How can I remove filter json-ld output only on specific page? This doesn’t work if I place it in functions.php, but I believe because it needs to be inside another action I think, not pure code like this

    if(is_singular(‘mycpt’)) :
    add_filter( ‘wpseo_json_ld_output’, ‘__return_false’ );
    endif;

    So I tried it like this but it doesn’t work, in this case maybe because it is too late, but I have also tried it the same with early “plugins_loaded” filter

    add_filter(‘the_content’, ‘specific_no_wpautopa’, 9);
    function specific_no_wpautopa($content) {
    if (is_singular(‘mycpt’)) {
    add_filter( ‘wpseo_json_ld_output’, ‘__return_false’);
    }
    return $content;
    }

    Or more specifically, can I remove only breadcrumb json-ld part on specific page?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Jeroen Rotty

    (@jeroenrotty)

    Hi @filoveg,

    Thank you for reaching out.

    While we can’t give you support on custom code or integration on your specific site, we do have a Developer portal on developer.yoast.com which has documentation on our APIs. More specifically, we recommend you to check this page:https://developer.yoast.com/features/schema/api/

    Plugin Support Carl B

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

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