forked from AgriLife/AgriFlex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate_members_only.php
43 lines (33 loc) · 940 Bytes
/
template_members_only.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
/**
* Template Name: Private: Must Be Logged In
*
* @package AgriFlex
* @since AgriFlex 1.0
*/
?>
<?php get_header(); ?>
<div id="wrap">
<div id="content" role="main">
<?php if (is_user_logged_in()) : ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?></h2>
<div class="storycontent">
<?php the_content(__('(more...)')); ?>
</div><!-- #post-<?php the_ID(); ?> -->
</div>
<?php endwhile; endif; ?>
<?php elseif : ?>
<div class="post">
<div class="entry">
<p>
You must <a href="<?php echo wp_login_url(); ?>" title="login">login</a> to view this page.
</p>
</div><!-- .entry -->
</div><!-- .post -->
<?php endif; ?>
</div><!-- #content -->
</div><!-- #wrap -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>