facetwp disable yoast next/prev links

djrmom

{{gist file=”custom-hooks.php” lang=”php”}}
<?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;
} );
{{/gist}}