Skip to content

Instantly share code, notes, and snippets.

@svlasov
Created February 28, 2012 15:21
Show Gist options
  • Save svlasov/1933083 to your computer and use it in GitHub Desktop.
Save svlasov/1933083 to your computer and use it in GitHub Desktop.
Function for displaying 404 page from arbitrary point of a WordPress plugin or theme
function _return_404() {
status_header(404);
nocache_headers();
include( get_404_template() );
exit;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment