-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchive-indicator.php
68 lines (66 loc) · 2.4 KB
/
archive-indicator.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
<?php get_header(); ?>
<section id="archive">
<header class="archive-header">
<div class="container">
<div class="twelve columns">
<?php
$title = get_field('indicator_page_title', 'option');
$title = $title ? $title : __('Aichi 11 Indicators', 'apca');
?>
<h1><?php echo $title; ?></h1>
</div>
</div>
</header>
<section class="archive-content indicators-content">
<div class="indicator-content-container">
<div class="container">
<div class="twelve columns">
<div class="indicator-content">
<?php the_field('indicator_page_content', 'option'); ?>
</div>
</div>
</div>
</div>
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<?php
$status_field = get_field_object('indicator_status');
$status_value = get_field('indicator_status');
$status_label = $status_field['choices'][$status_value];
?>
<article id="indicator-<?php the_ID(); ?>" class="status-<?php echo $status_value; ?>">
<div class="container">
<div class="seven columns">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="excerpt">
<?php the_excerpt(); ?>
</div>
<?php if(have_rows('indicator_links')) : ?>
<div class="links">
<?php while(have_rows('indicator_links')) : the_row(); ?>
<a class="button" target="_blank" rel="external" href="<?php the_sub_field('link_url'); ?>"><?php the_sub_field('link_title'); ?></a>
<?php endwhile; ?>
</div>
<?php endif; ?>
</div>
<div class="five columns">
<div class="status-icon">
<img src="<?php echo apca_get_indicator_status_image_url(); ?>" />
</div>
<p class="status"><?php echo $status_label; ?></p>
<p class="status-text"><?php the_field('indicator_status_text'); ?></p>
</div>
</div>
</article>
<?php endwhile; endif; ?>
<div class="indicator-disclaimer-container">
<div class="container">
<div class="twelve columns">
<div class="indicator-disclaimer">
<?php the_field('indicator_page_content', 'option'); ?>
</div>
</div>
</div>
</div>
</section>
</section>
<?php get_footer(); ?>