-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent-bi-unit.php
More file actions
86 lines (75 loc) · 3.19 KB
/
Copy pathcontent-bi-unit.php
File metadata and controls
86 lines (75 loc) · 3.19 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
<?php
if ( ! defined( 'ABSPATH' ) ) die('no direct access'); // Exit if accessed directly
$country = wp_get_post_terms( get_the_ID(), 'country' );
$iso = get_field( 'iso_code', $country[0] );
?>
<div class="col-md-12 case_col">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="row">
<div class="col-md-9 col-sm-8">
<h2 class="article-title h4"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
</div>
<div class="col-md-3 col-sm-4">
<div class="pull-right country_flag">
<a href="<?php echo get_post_type_archive_link( 'bi-unit' ); ?>?_countries=<?php echo $country[0]->slug; ?>" title="<?php echo __( 'All BI unit by:', 'opsi' ); ?> <?php echo $country[0]->name; ?>" class="blacklink" >
<?php echo $country[0]->name; ?>
</a>
<a href="<?php echo get_post_type_archive_link( 'bi-unit' ); ?>?_countries=<?php echo $country[0]->slug; ?>">
<img src="<?php echo get_stylesheet_directory_uri().'/images/flags/'.$iso.'.png'; ?>" width="96" height="96" alt="<?php echo $country[0]->name; ?>" class="cs_flag" />
</a>
</div>
</div>
</div>
<hr class="divline">
<div class="row">
<div class="col-md-3 col-sm-4">
<div class="post_tags_wrap">
<div class="post_tags">
<div>
<strong>Institution </strong><br>
<?php
$institutions = get_the_terms( get_the_ID(), 'bi-institution' );
echo $institutions[0]->name;
?>
</div>
<?php
// Policy area terms
if ( !empty( get_field( 'activities_which_of_the_following_policy_areas_has_your_unit_been_involved_in' ) ) ) {
$terms = get_field( 'activities_which_of_the_following_policy_areas_has_your_unit_been_involved_in' );
$terms_list = '<div><strong>Policy area </strong><br>';
foreach ( $terms as $term ) {
$terms_list .= $term->name . ', ';
}
$terms_list = rtrim( $terms_list, ', ' );
echo $terms_list . '</div>';
}
?>
</div>
</div>
</div>
<div class="col-md-9 col-sm-8">
<?php
$team_situated = get_field( 'your_team_where_is_your_team_situated' );
if ( $team_situated != '' ) { ?>
<p class="csp">The team is <?php echo $team_situated['label']; ?></p>
<?php } ?>
<?php
$people_number = get_field( 'your_team_how_many_people_including_yourself_apply_behavioral_science_in_your_team' );
if ( $people_number != '' ) { ?>
<p class="csp">Number of people that apply BI in the team: <?php echo $people_number; ?></p>
<?php } ?>
<?php
$creation_date = get_field( 'your_team_ approximately_when_was_your_team_created_at_your_organization_or_if_it’s_just_you_when_was_your_role_created' );
if ( $creation_date != '' ) { ?>
<p class="csp">Approximate date of team creation: <?php echo $creation_date; ?></p>
<?php } ?>
<p class="read_more">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" class="button btn btn-default btn-sm">
<?php echo __( 'Read BI Unit', 'opsi' ); ?>
<i class="fa fa-chevron-right" aria-hidden="true"></i>
</a>
</p>
</div>
</div>
</article>
</div>