We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 436e678 commit 9d28ae8Copy full SHA for 9d28ae8
template-logged-in.php
@@ -0,0 +1,29 @@
1
+<?php
2
+/* Template Name: Logged in content page */
3
+ get_header();
4
+ the_post();
5
+?>
6
+<section class="main-content">
7
+ <div class="grid-container">
8
+ <div class="grid-x grid-padding-x align-center">
9
+ <div class="cell large-8 medium-8">
10
+ <header class="entry-header page-header">
11
+ <h1 class="entry-title"><?php the_title() ?></h1>
12
+ </header>
13
+ <section class="entry-content page-content">
14
+ <?php
15
+ if ( is_user_logged_in() ) {
16
+ the_content();
17
+ } else {
18
+ echo '<div class="callout warning">';
19
+ echo '<h5 class="title">Sorry</h5>';
20
+ echo '<p>You have to be logged in to see this content</p>';
21
+ echo '</div>';
22
+ }
23
+ ?>
24
+ </section>
25
+ </div>
26
27
28
+</section>
29
+<?php get_footer(); ?>
0 commit comments