Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created November 4, 2016 16:00
Tell SEO bots to not index Event Espresso event pages. Useful if the event pages are all duplicated content.
<?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 ('espresso_events' == get_post_type() && is_single() ) {
?>
<meta name="robots" content="noindex">
<?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