Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Forked from joshfeck/robots.php
Last active February 23, 2018 11:47
Show Gist options
  • Save Pebblo/9b83bb937b9cd3f2d5465535d7875c9f to your computer and use it in GitHub Desktop.
Save Pebblo/9b83bb937b9cd3f2d5465535d7875c9f to your computer and use it in GitHub Desktop.
Tell SEO bots to not index Event Espresso taxonomy pages.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function ee_no_index_tagseo_meta() {
if (is_tax('espresso_event_categories') ) {
?>
<meta name="robots" content="noindex tony">
<?php
}
}
add_action( 'wp_head', 'ee_no_index_tagseo_meta', 9 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment