I know it can be disabled everywhere with
add_filter( 'wpseo_json_ld_output', '__return_false' );
But i want to keep the breadcrumbs so if i could do that only if (is_home())
that would be perfect. I just don't know where to hook it.
I know it can be disabled everywhere with
add_filter( 'wpseo_json_ld_output', '__return_false' );
But i want to keep the breadcrumbs so if i could do that only if (is_home())
that would be perfect. I just don't know where to hook it.
1 Answer
Reset to default 1try like this
function filter_wpseo_json_ld_output( $bool, $context ) {
if(is_home()){ return false; }
return $bool;
};
// add the filter
add_filter( 'wpseo_json_ld_output', 'filter_wpseo_json_ld_output', 10, 2 );
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742315721a4420798.html
评论列表(0条)