• 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)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to remove filter json-ld only on specific page?’ is closed to new replies.