-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-artist.php
126 lines (78 loc) · 4.74 KB
/
single-artist.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
119
120
121
122
123
124
125
126
<?php get_header(); ?>
<div id="content">
<div id="inner-content" class="wrap clearfix">
<div id="main" class="sixcol first clearfix" role="main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php
$artist_fields = array('_artist_website','_artist_facebook','_artist_twitter',
'_artist_instagram','_artist_soundcloud','_artist_youtube_embed',
'_artist_vimeo_embed','_artist_soundcloud_embed','_artist_mp3_id',
'_artist_mp3_name');
$artist_data = array();
foreach($artist_fields as $artist_field) {
$artist_data[$artist_field] = get_post_meta ($post->ID, $artist_field, true);
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article">
<header class="article-header">
<h1 class="single-title custom-post-type-title"><?php the_title(); ?></h1>
</header> <!-- end article header -->
<section class="entry-content clearfix">
<?php the_post_thumbnail( 'wtf-artistpage' ); ?>
<div class="artist-bio">
<?php the_content(); ?>
</div>
</section> <!-- end article section -->
<footer class="article-header">
</footer> <!-- end article footer -->
</article> <!-- end article -->
<?php endwhile; ?>
<?php else : ?>
<article id="post-not-found" class="hentry clearfix">
<header class="article-header">
<h1><?php _e("Oops, Post Not Found!", "bonestheme"); ?></h1>
</header>
<section class="entry-content">
<p><?php _e("Uh Oh. Something is missing. Try double checking things.", "bonestheme"); ?></p>
</section>
<footer class="article-footer">
<p><?php _e("This is the error message in the single-custom_type.php template.", "bonestheme"); ?></p>
</footer>
</article>
<?php endif; ?>
</div> <!-- end #main -->
<div id="artist_sidebar" class="artist_sidebar sixcol last clearfix" role="complementary">
<?php
if($artist_data['_artist_youtube_embed']){
echo '<iframe width="554" height="437" src="http://www.youtube.com/embed/'.$artist_data['_artist_youtube_embed'].'" frameborder="0" allowfullscreen></iframe>';
}elseif($artist_data['_artist_vimeo_embed']){
echo '<iframe width="359" height="283" src="http://player.vimeo.com/video/'.$artist_data['_artist_vimeo_embed'].'?title=0&byline=0&portrait=0&color=ffffff" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>';
}elseif($artist_data['_artist_soundcloud_embed']){
echo do_shortcode('[soundcloud]' . $artist_data['_artist_soundcloud_embed'] . '[/soundcloud]');
}
echo '<div id="artist_links">';
if($artist_data['_artist_website']){
echo '<a title="Artist Website" alt="Artist Website" href="' . $artist_data['_artist_website'] . '" target="www"><div class="www">website</div></a>';
}
if($artist_data['_artist_facebook']){
echo '<a title="Artist Facebook" alt="Artist Facebook" href="' . $artist_data['_artist_facebook'] . '" target="fb"><div class="fb">facebook</div></a>';
}
if($artist_data['_artist_twitter']){
echo '<a title="Artist Twitter" alt="Artist Twitter" href="' . $artist_data['_artist_twitter'] . '" target="tw"><div class="tw">twitter</div></a>';
}
if($artist_data['_artist_instagram']){
echo '<a title="Artist Twitter" alt="Artist Twitter" href="' . $artist_data['_artist_instagram'] . '" target="tw"><div class="tw">twitter</div></a>';
}
if($artist_data['_artist_soundcloud']){
echo '<a title="Artist Soundcloud" alt="Artist Soundcloud" href="' . $artist_data['_artist_soundcloud'] . '" target="sc"><div class="sc">soundcloud</div></a>';
}
if($artist_data['_artist_mp3_name']){
echo '<a href="javascript:;" class="artist_mp3 details_mp3" id="' . $artist_data['_artist_mp3_id'] . '" name="' . $artist_data['_artist_mp3_name'] . '"><div></div> PLAY MP3</a><div class="clear"></div>';
}
echo '<div class="clearfix"></div></div>';
echo do_shortcode( '[social_share/]' );
?>
</div>
</div> <!-- end #inner-content -->
</div> <!-- end #content -->
<?php get_footer(); ?>