Skip to content

Instantly share code, notes, and snippets.

@georgestephanis
Created March 29, 2021 15:22
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 georgestephanis/11ec988ec3b9e43b9f8a2779ee3ab91a to your computer and use it in GitHub Desktop.
Save georgestephanis/11ec988ec3b9e43b9f8a2779ee3ab91a to your computer and use it in GitHub Desktop.
`off-with-its-head` theme
<?php
if ( ! headers_sent() ) {
nocache_headers();
header( 'X-Robots-Tag: noindex, nofollow, noarchive, nosnippet' );
wp_safe_redirect( admin_url() );
}
?>
<!DOCTYPE html>
<html>
<head>
<meta name="robots" content="noindex, nofollow, noarchive, nosnippet" />
<meta http-equiv="refresh" content="0; url=<?php echo esc_attr( admin_url() ); ?>" />
</head>
</html>
/*
Theme Name: Off With Its Head
Theme URI: https://example.com
Author: WordPress.com Special Projects
Author URI: https://wpspecialprojects.wordpress.com/
Description: A blank theme that doesn't display any content. Useful when using WordPress as a headless backend.
Requires at least: 5.6
Tested up to: 5.7
Requires PHP: 5.7
Version: 1.0.0
License: GNU General Public License v2 or later
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment