File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
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
+ </div>
27
+ </div>
28
+ </section>
29
+ <?php get_footer (); ?>
You can’t perform that action at this time.
0 commit comments