admin管理员组文章数量:1333440
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 );
本文标签: how to disable Yoast SEO schema from homepage only
版权声明:本文标题:how to disable Yoast SEO schema from homepage only? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742315720a2451776.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论