我有重复的标题和重复的元描述问题的分类档案排序。
虽然其他子页面没有正确索引,但重复问题在1号出现在以下模式中。
/product-category/name/
/product-category/name/?orderby=dat
/product-category/name/?orderby=menu_order
/product-category/name/?orderby=price-desc
/product-category/name/?orderby=price我正在使用Yoast SEO插件,我们如何从排序中不索引这些档案?
发布于 2017-03-13 18:49:31
在您的functions.php中使用此代码
add_action( 'wp_head', 'cp_prevent_indexing_orderby' );
if(!function_exists('cp_prevent_indexing_orderby')){
function cp_prevent_indexing_orderby () {
if (isset($_GET['orderby'])){
echo '<meta name="robots" content="noindex, nofollow">';
}
}
}https://stackoverflow.com/questions/38392686
复制相似问题