forked from rotarytheme/rotary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar-speaker.php
66 lines (66 loc) · 2.43 KB
/
sidebar-speaker.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
<?php
/**
* The Sidebar containing the primary and secondary widget areas.
*
* @package WordPress
* @subpackage Rotary
* @since Rotary 1.0
*/
?>
<aside id="speaker-sidebar" role="complementary">
<ul>
<li id="speaker-sidebar-thumbnail-container">
<?php if ( has_post_thumbnail() ) { the_post_thumbnail('medium');} ?>
</li>
<li id="speaker-side-container">
<h3 class="speakerbio"><?php _e( 'About the Speaker', 'Rotary' ); ?></h3>
<ul>
<li id="speaker-bio">
<?php echo the_field( 'speaker_bio' ); ?>
</li>
</ul>
</li>
<li id="speaker-side-footer">
<ul>
<li id="categories">
<h3><?php _e( 'Categories', 'Rotary' ); ?></h3>
<ul>
<?php $terms = wp_get_post_terms( get_the_id(), 'rotary_speaker_cat' ); ?>
<?php if ($terms) : ?>
<?php foreach ($terms as $term) : ?>
<?php $taxonomy = get_taxonomy('rotary_speaker_cat'); ?>
<li class="cat-item"><a href="<?php echo trailingslashit(site_url() .'/'. $taxonomy->rewrite['slug'] .'/'.$term->slug); ?>"><?php echo $term->name; ?></a></li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</li>
<li id="photos">
<h3><?php _e( 'Photographs', 'Rotary' ); ?></h3>
<ul>
<?php if(get_field('speaker_program_images')): ?>
<li class="speakerthumbs">
<?php while(has_sub_field('speaker_program_images')): ?>
<?php $image = wp_get_attachment_image_src( get_sub_field('speaker_program_image'), 'full' ); ?>
<a class="fancybox" rel="gallery1" href="<?php echo $image[0]?>" title="">
<?php $image = wp_get_attachment_image_src( get_sub_field('speaker_program_image'), 'thumbnail' ); ?>
<img class="alignleft" src="<?php echo $image[0]?>" alt="" title=""/></a>
<?php endwhile; ?>
</li>
<?php endif; ?>
</ul>
</li>
<li id="tags" class="clearleft">
<h3><?php _e( 'Tags', 'Rotary' ); ?></h3>
<ul class="tagcloud">
<?php $terms = wp_get_post_terms( get_the_id(), 'rotary_speaker_tag' ); ?>
<?php if ($terms) : ?>
<?php foreach ($terms as $term) : ?>
<li class="cat-item"><a href="<?php echo trailingslashit(site_url() .'/rotary_speaker_tag/'. $term->slug); ?>"><?php echo $term->name; ?></a></li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
</li>
</ul>
</li>
</ul><!--end speaker widget area -->
</aside>