Skip to content

Instantly share code, notes, and snippets.

@paulgibbs
Created September 21, 2013 21:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulgibbs/6654255 to your computer and use it in GitHub Desktop.
Save paulgibbs/6654255 to your computer and use it in GitHub Desktop.
<?php
function alec_redirect() {
if ( is_single() && get_post_type() === 'achievement' ) {
global $wp_query;
$wp_query->set_404();
status_header( 404 );
nocache_headers();
}
}
add_action('template_redirect', 'alec_redirect' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment