-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle-articles.php
More file actions
104 lines (86 loc) · 2.79 KB
/
single-articles.php
File metadata and controls
104 lines (86 loc) · 2.79 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
95
96
97
98
99
100
101
102
103
104
<?php
get_header();
$month = strlen( get_the_date( 'F' ) );
$date = ( $month > 3 ? get_the_date( 'M. j, Y' ) : get_the_date( 'M j, Y' ) );
$attachments = attachments_get_attachments();
$pub_attorneys = get_post_meta( $post->ID, 'pub_attorneys', 'single' );
$pub_practices = get_post_meta( $post->ID, 'pub_practices', 'single' );
if ( $attachments ) {
$pdf = $attachments[0]['location'];
} else {
$pdf = '';
}
?>
<div id="primary" class="content-area page-default">
<header class="page-header">
<div class="span12 aligncenter">
<h1 class="page-title"><?php the_title(); ?></h1>
<?php if ( has_term( 'food-beverage', 'industries_tax') ) : ?>
<div class="page-subtitle">
<a href="<?php echo esc_url( site_url( '/insights-industries/food-beverage/' ) ); ?>">Food & Beverage</a>
</div>
<?php endif; ?>
<div class="entry-meta">
<strong class="meta-date font-heading caps"><?php echo get_the_date('M. j, Y'); ?></strong>
</div><!-- .entry-meta -->
</div>
</header>
<main id="main" class="site-main span12 aligncenter clear" role="main">
<aside class="aside aside-left aside-author-share">
<div class="border-block top categories">
<h3 class="block-label">Attorneys</h3>
<ul class="list list-2 attorney_article">
<?php
$loop = new WP_Query( array(
'post_type' => 'attorneys',
'meta_key' => 'last_name',
'orderby' => 'meta_value',
'order' => 'ASC',
'posts_per_page' => 100
) );
while ( $loop->have_posts() ) : $loop->the_post();
if ( in_array( $post->ID, $pub_attorneys ) ) :
?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</li>
<?php
endif;
endwhile;
?>
</ul>
</div>
</aside>
<article id="post-<?php the_ID(); ?>" <?php post_class('span6 push-left'); ?>>
<?php if ( have_posts() ) :
while ( have_posts() ) : the_post(); ?>
<div class="entry-content">
<?php the_content(); ?>
</div>
<?php endwhile; ?>
<?php endif; ?>
</article>
<aside class="aside aside-right aside-categories">
<div class="border-block top categories">
<h3 class="block-label">Practice Areas</h3>
<ul class="list list-2">
<?php
$loop = new WP_Query( array(
'post_type' => 'practices',
'orderby' => 'title',
'order' => 'ASC',
'posts_per_page' => 100
) );
while ( $loop->have_posts() ) : $loop->the_post();
if ( in_array( $post->ID, $pub_practices ) ) :
?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php
endif;
endwhile;
?>
</ul>
</div>
</aside>
</div>
<?php get_footer(); ?>