-
Notifications
You must be signed in to change notification settings - Fork 0
/
single-profile.php
101 lines (92 loc) · 4.51 KB
/
single-profile.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
<?php get_header(); ?>
<?php wp_link_pages(); ?>
<div class="container-fluid">
<?php
if (have_posts()) : // WordPress ループ
while (have_posts()) :
the_post(); // 繰り返し処理開始
?>
<div class="row div-singleprofile-row">
<!-- Report -->
<div class="div-singleprofile-back"
style="background-image: url(<?php echo get_thumbnail_full_url(has_post_thumbnail()) ?>)">
</div>
<div id="profile-<?php the_ID(); ?>" class="div-singleprofile-content">
<div class="col-sm-5 div-singleprofile-thumbnail">
<div class="div-singleprofile-icon"
style="background-image: url(<?php echo get_thumbnail_full_url(has_post_thumbnail()) ?>)">
</div>
<p class="p-singleprofile-name">
<?php echo get_the_title(); ?>
</p>
<?php
$value = get_field('catchcopy');
echo '<p>' . $value . '</p>';
?>
</div>
<div class="col-sm-7">
<div class="div-singleprofile-field-wrap">
<p class="p-singleprofile-field">
<span class="profile-field-name"><i class="fa fa-briefcase"
aria-hidden="true"></i> 職種</span>
<?php
$field = get_field_object('department');
$value = get_field('department');
$label = $field['choices'][$value];
echo '<span class="span-singleprofile-field-value">' . $label . '</span>';
?>
</p>
<p class="p-singleprofile-field">
<span class="profile-field-name"><i class="fa fa-graduation-cap"
aria-hidden="true"></i>大学</span>
<?php
$value = get_field('university');
echo '<span class="span-singleprofile-field-value">' . $value . '</span>';
?>
</p>
<p class="p-singleprofile-field">
<span class="profile-field-name"><i class="fa fa-star" aria-hidden="true"></i> 専門</span>
<?php
$value = get_field('major');
echo '<span class="span-singleprofile-field-value">' . $value . '</span>';
?>
<?php
$value = get_field('grade');
echo '<span class="span-singleprofile-field-grade">' . $value . '</span>';
?>
</p>
<p class="p-singleprofile-field">
<span class="profile-field-name"><i class="fa fa-tag" aria-hidden="true"></i> ニックネーム</span>
<?php
$value = get_field('nickname');
echo '<span class="span-singleprofile-field-value span-singleprofile-field-nick">' . $value . '</span>';
?>
</p>
<p class="p-singleprofile-field">
<span class="profile-field-name"><i class="fa fa-thumbs-up"
aria-hidden="true"></i> 興味</span>
<?php
$value = get_field('interest');
echo '<span class="span-singleprofile-field-value">' . $value . '</span>';
?>
</p>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<?php the_content(); ?>
</div>
<?php
endwhile; // 繰り返し処理終了
else : // ここから記事が見つからなかった場合の処理
include('no-article.php');
endif;
?>
<p>
<a href="/profile">« メンバー一覧に戻る</a>
</p>
</div>
<?php get_footer(); ?>