-
Notifications
You must be signed in to change notification settings - Fork 1
/
page-about.php
118 lines (99 loc) · 2.79 KB
/
page-about.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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site may use a
* different template.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Artist_FWD
*/
get_header();
?>
<main id="primary" class="site-main">
<?php
while ( have_posts() ) :
the_post();
?>
<div class="entry-content">
<section class="about-section">
<?php
if ( function_exists( 'get_field' ) ) :
if ( get_field( 'portrait') ) :
$portrait = get_field( 'portrait' );
echo wp_get_attachment_image( $portrait, 'large' );
endif;
endif;
if (function_exists( 'get_field_object' ) ) :
if ( get_field_object( 'about') ) :
$field = get_field_object('about');
?>
<div class="about-content-wrap">
<h1 class="page-title"><?php echo $field['label']; ?></h1>
<p><?php echo esc_html($field['value']); ?></p>
</div>
<?php
endif;
endif;
?>
</section>
<?php
if ( function_exists( 'get_field' ) ) :
?>
<section class="about-accessories">
<?php
if ( get_field( 'cv_link') ) :
?>
<a class="faux-btn" href="<?php the_field('cv_link'); ?>" target="_blank" rel="noopener noreferrer">CV
</a>
<?php
endif;
if ( get_field( 'portfolio_cta') ) :
?>
<a class="faux-btn" href="<?php the_field('portfolio_cta'); ?>" target="_blank"
rel="noopener noreferrer">Portfolio</a>
<?php
endif;
?>
</section>
<?php
if ( get_field( 'collab_links') ) :
$collabObj = get_field_object('collab_links');
$collabs = get_field( 'collab_links' );
?>
<div class="about-bottom-row">
<section class="about-collabs">
<h2><?php echo esc_html($collabObj['label']); ?></h2>
<div class="collab-wrap">
<?php
$len = count($collabs);
foreach( $collabs as $collab ) :
?>
<a class="collaborator" href="<?php echo esc_url($collab['collab_name']['url']); ?>" target="_blank"
rel="noopener noreferrer"><?php echo esc_html($collab['collab_name']['title']); ?></a>
<?php
if( $len > 1) :
echo '<br>';
$len--;
endif;
endforeach;
?>
</div>
</section>
<?php
endif;
endif;
?>
</div>
<?php
?>
</div>
<?php
endwhile;
?>
</main>
<?php
get_footer();