-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpage.php
72 lines (54 loc) · 2.77 KB
/
page.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php //if ( ufl_check_page_visitor_level( $post->ID ) > 0 ) { define( 'DONOTCACHEPAGE', 1 ); } ?>
<?php include("header.php"); ?>
<?php ufandshands_breadcrumbs(); ?>
<div id="content-wrap">
<div id="content-shadow">
<div id="content" class="container">
<?php if ( ufl_check_authorized_user( $post->ID ) ) { // check if logged in/valid shib user required
get_sidebar(); //call in the sidebar and navigation
$page_right_sidebar = ufandshands_sidebar_detector('page_right',false);
$article_width = '';
if(((!empty($ufandshands_sidebar_nav) || !empty($ufandshands_sidebar_widgets)) && $page_right_sidebar)) {
$article_width = '12';
$content_width = 460;
} elseif (((!empty($ufandshands_sidebar_nav) || !empty($ufandshands_sidebar_widgets)) && !$page_right_sidebar)) {
$article_width = '18';
$content_width = 680;
} elseif ((empty($ufandshands_sidebar_nav) && empty($ufandshands_sidebar_widgets) && $page_right_sidebar)) {
$article_width = '17 box';
$content_width = 660;
} else {
$article_width = '23 box';
$content_width = 900;
}
?>
<article id="main-content" class="span-<?php echo $article_width; ?>" role="main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php ufandshands_content_title(); //page title ?>
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
<div class="single-meta">
<?php the_tags('<p class="tag black-50">Tagged as: ', ', ','</p>'); ?>
</div>
<?php endwhile; endif; //main article loop ends?>
<?php if ( is_user_logged_in() ) { ?>
<p id="edit" class="clear" style="margin-top:20px;"><?php edit_post_link('Edit this article', ' » ', ''); ?> | <a href="<?php echo wp_logout_url(); ?>" title="Log out of this account">Log out »</a></p>
<?php } ?>
</article>
<?php //page right sidebar
if ($page_right_sidebar) {
echo "<aside id='local-sidebar' class='span-6 omega'>";
echo $page_right_sidebar;
echo "</aside><!-- end #local-sidebar -->";
}
?>
<?php } else { // users are not logged in display error or login button ?>
<article id="main-content" class="span-23 box" role="main">
<?php get_template_part('content','restricted'); ?>
</article>
<?php } ?>
</div>
</div>
</div>
<?php include('user-role-menu.php'); ?>
<?php include("footer.php"); ?>