Create a gist now

Instantly share code, notes, and snippets.

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