Skip to content

Instantly share code, notes, and snippets.

@jkudish
Created March 3, 2012 06:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jkudish/1964698 to your computer and use it in GitHub Desktop.
Save jkudish/1964698 to your computer and use it in GitHub Desktop.
noindex single tribe_events
<?php
add_action('wp_head','tribe_dont_index_single_events');
function tribe_dont_index_single_events() {
if ( is_singular() && get_post_type() == TribeEvents::POSTTYPE )
echo '<meta name="robots" content="noindex">';
}
@jo-snips
Copy link

Hey Joey, just noticed the function called in the action doesn't match the function name...

@jkudish
Copy link
Author

jkudish commented Mar 14, 2012

@jo-snips Good point, now fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment