Skip to content

Instantly share code, notes, and snippets.

@guydumais
Last active June 30, 2017 03:06
Show Gist options
  • Save guydumais/9448c339f2272a0999421462a40f9cc6 to your computer and use it in GitHub Desktop.
Save guydumais/9448c339f2272a0999421462a40f9cc6 to your computer and use it in GitHub Desktop.
WordPress / Désactiver contenu en double (duplicate content) pour les catégories
<?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