Skip to content

Instantly share code, notes, and snippets.

@miziomon
Last active August 29, 2015 14:20
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 miziomon/5b89463238489ff01527 to your computer and use it in GitHub Desktop.
Save miziomon/5b89463238489ff01527 to your computer and use it in GitHub Desktop.
WordPress Template scaffolding for restricted are
<?php
/**
*
* Template Name: Restricted Area
*
*/
if( !is_user_logged_in() ) {
wp_redirect( WP_HOME ); // redirect to home
exit;
}
get_header();
?>
<div class="container">
// your code
</div>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment