Last active
June 30, 2017 03:06
-
-
Save guydumais/9448c339f2272a0999421462a40f9cc6 to your computer and use it in GitHub Desktop.
WordPress / Désactiver contenu en double (duplicate content) pour les catégories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Éliminer le contenu en double des catégories. | |
* | |
* @author Guy Dumais. | |
* @link https://guydumais.digital/comment-eviter-le-contenu-en-double-dans-wordpress/ | |
*/ | |
add_action( 'wp_head', $af = function() { | |
// Ajouter le meta robots noindex, follow pour les catégories. | |
if ( is_category() ) { | |
wp_no_robots(); | |
} | |
} ); | |
unset( $af ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment