<?php
$url = $_SERVER['REQUEST_URI'];
if(strstr($url,'/page/')==true):
?>
<meta name="robots" content="noindex,follow">
<?php
$cat = get_the_category();
$cat_id = $cat[0]->cat_ID;
$link = get_category_link($cat_id);
?>
<link rel="canonical" href="<?php echo $link; ?>">
<?php else: ?>
<link rel="canonical" href="<?=home_url().$_SERVER["REQUEST_URI"]; ?>">
<?php endif; ?>
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)