Skip to content

Instantly share code, notes, and snippets.

@cornernote
Created February 22, 2014 06:24
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 cornernote/9149535 to your computer and use it in GitHub Desktop.
Save cornernote/9149535 to your computer and use it in GitHub Desktop.
add_filter('template_redirect', 'my_404_override');
add_filter('the_content', 'my_content_override');
function my_404_override()
{
global $wp_query;
if (true) {
status_header(200);
$wp_query->is_404 = false;
}
}
function my_content_override()
{
echo '<div>hello world</div>';
print_r($_GET);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment