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.
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 | |
//* 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