-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsingle.php
More file actions
executable file
·94 lines (78 loc) · 2.71 KB
/
Copy pathsingle.php
File metadata and controls
executable file
·94 lines (78 loc) · 2.71 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php disallow_direct_load('single.php');?>
<?php get_header(); the_post();?>
<?php wp_reset_query(); ?>
<?php
$counter = 0;
$args = array( 'post_type' => 'newsletter', 'orderby'=> 'menu_order', 'order'=>'ASC', 'posts_per_page' => -1);
$lastposts = get_posts( $args );
foreach($lastposts as $row) :
$counter++;
endforeach;
?>
<?php wp_reset_query(); ?>
<?php
$post_objects = get_field('post_objects');
if( $post_objects ):
?>
<div class="row page-content" id="newsletter">
<div id="newsletter-header" class="single-newsletter-header">
<div id="newsletter-date-header">
<p>
<?php
$post_objects_title_check = get_field( 'post_objects' );
if( $post_objects_title_check ):
$post = $post_objects_title_check;
setup_postdata( $post );
?>
<a href="<?php the_permalink(); ?>" class="newsletter-parent-link"><?php the_title(); ?></a>
<?php
endif;
?>
<?php
if ( $counter > 1 ):
?>
<span>|</span> <a href="<?php echo get_post_type_archive_link( 'newsletter' ); ?>">See Previous Editions</a>
<?php
endif;
?>
</p>
</div>
<?php wp_reset_postdata(); ?>
<div id="newletter-logo-header">
<h1>
<img src="<?php echo get_template_directory_uri(); ?>/static/img/integritystar-logo.png" alt="IntegrityStar UCF Compliance & Ethics Newsletter" />
<span>UCF Compliance & Ethics Newsletter</span>
</h1>
</div>
</div>
<div id="newsletter-article-container">
<div class="primary-article-container">
<h2><?php the_field('custom_post_display_title'); ?></h2>
<?php the_content(); ?>
</div>
</div>
</div>
<div class="row newsletter-the-fold" id="below-the-fold">
<div class="span4" id="below-the-fold-icon">
<p><a href="http://compliance.ucf.edu/compliance-helpline/" onclick="_gaq.push(['_trackEvent','Compliance_Below_the_Fold_Event','Button_Click','Go_to_IntegrityLine_page'])"><img src="<?php echo get_template_directory_uri(); ?>/static/img/below-the-fold.png" alt="Speak up when you know of or suspect unethical behavior." title="The INTEGRITYLINE allows you to report ethical concerns without the fear of retaliation — 24/7. Secure. Anonymous." /></a></p>
</div>
<div class="span8" id="below-the-fold-content">
<?php dynamic_sidebar( 'newsletter-speak-up' ); ?>
</div>
</div>
<?php else: ?>
<?php wp_reset_postdata(); ?>
<div class="row page-content" id="<?php $post->post_name; ?>">
<div class="span12">
<header>
<h1><?php the_title();?></h1>
</header>
</div>
<div class="span11">
<article>
<?php the_content();?>
</article>
</div>
</div>
<?php endif; ?>
<?php get_footer();?>