篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php facetwp禁用yoast next / prev链接相关的知识,希望对你有一定的参考价值。
<?php
/** this will disable yoast's seo next/prev links if you are concerned about them being different from
** facetwp pager links
**/
add_filter( 'wpseo_prev_rel_link', '__return_false' );
add_filter( 'wpseo_next_rel_link', '__return_false' );
/** you can also apply it conditionally so you only disable on facet pages **/
add_filter( 'wpseo_prev_rel_link', function( $prev ) {
if ( is_post_type_archive('product') ) {
return false;
}
return $prev;
} );
以上是关于php facetwp禁用yoast next / prev链接的主要内容,如果未能解决你的问题,请参考以下文章