-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtemplate-logged-in.php
29 lines (29 loc) · 1.05 KB
/
template-logged-in.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
/* Template Name: Logged in content page */
get_header();
the_post();
?>
<section class="main-content">
<div class="grid-container">
<div class="grid-x grid-padding-x align-center">
<div class="cell large-8 medium-8">
<header class="entry-header page-header">
<h1 class="entry-title"><?php the_title() ?></h1>
</header>
<section class="entry-content page-content">
<?php
if ( is_user_logged_in() ) {
the_content();
} else {
echo '<div class="callout warning">';
echo '<h5 class="title">Sorry</h5>';
echo '<p>You have to be logged in to see this content</p>';
echo '</div>';
}
?>
</section>
</div>
</div>
</div>
</section>
<?php get_footer(); ?>