|
1 <script src="<?php echo get_template_directory_uri(); ?>/js/scriptPortfolio.js" type="text/javascript"></script> |
|
2 |
|
3 <script type="text/javascript"> |
|
4 jQuery(document).ready(function(){ |
|
5 jQuery("a#example1").fancybox(); |
|
6 }); |
|
7 |
|
8 </script> |
|
9 <?php |
|
10 |
|
11 if ( have_posts() ) while ( have_posts() ) : the_post(); |
|
12 |
|
13 $portfolioType = get_post_meta($post->ID, 'portfolio_type_selected' , true); |
|
14 $portfolioDate = get_post_meta($post->ID, 'portfolio_date' , true); |
|
15 $portfolioClient = get_post_meta($post->ID, 'portfolio_client' , true); |
|
16 $portfolioURL = get_post_meta($post->ID, 'portfolio_url' , true); |
|
17 $portfolioABSTRACT = get_post_meta($post->ID, 'portfolio_abstract' , true); |
|
18 $portfolioEMBED = get_post_meta($post->ID, 'portfolio_embed' , true); |
|
19 $portfolioTWITTER = get_post_meta($post->ID, 'portfolio_twitter' , true); |
|
20 |
|
21 ?> |
|
22 <div class="item-desc fl"> |
|
23 <a href="" class="ajax-back" onclick="return backToPorfolios();"><span><?php _e('menu','pego_tr'); ?></span></a> |
|
24 |
|
25 <h2><?php the_title(); ?></h2> |
|
26 <?php |
|
27 $terms = get_the_term_list( $post->ID,'portfolio_categories', '', ', '); |
|
28 $terms = strip_tags( $terms ); |
|
29 ?> |
|
30 <p><?php echo $terms; ?></p> |
|
31 <div class="dotted-line"></div> |
|
32 <p class="item-text"><?php echo get_the_content(); ?></p> |
|
33 <?php |
|
34 if (!empty($portfolioURL)) |
|
35 { |
|
36 ?> |
|
37 <div class="url-stuff fl" style="margin-top: 0;margin-right:5px;"> |
|
38 <a href="<?php echo $portfolioURL; ?>" target="_blank">Controverse</a> |
|
39 </div> |
|
40 <?php |
|
41 } |
|
42 ?> |
|
43 <?php |
|
44 if (!empty($portfolioABSTRACT)) |
|
45 { |
|
46 ?> |
|
47 <div class="url-stuff fl" style="margin-top: 0;margin-right:5px;"> |
|
48 <a href="<?php echo $portfolioABSTRACT; ?>" target="_blank">Abstract</a> |
|
49 </div> |
|
50 <?php |
|
51 } |
|
52 ?> |
|
53 <?php |
|
54 if (!empty($portfolioClient)) |
|
55 { |
|
56 ?> |
|
57 <div class="url-stuff fl" style="margin-top: 0;margin-right:5px;margin-bottom:10px;"> |
|
58 <a href="<?php echo $portfolioClient; ?>" target="_blank">Site de l'intervenant</a> |
|
59 |
|
60 </div> |
|
61 <?php |
|
62 } |
|
63 ?> |
|
64 |
|
65 |
|
66 <?php |
|
67 if (!empty($portfolioTWITTER)) |
|
68 { |
|
69 ?> |
|
70 <div class="url-stuff fl" style="margin-top: 10px;margin-right:5px;margin-bottom:10px; width:100%;"> |
|
71 <a href="https://twitter.com/<?php echo $portfolioTWITTER; ?>" target="_blank">@<?php echo $portfolioTWITTER; ?></a> |
|
72 </div> |
|
73 <?php |
|
74 } |
|
75 ?> |
|
76 |
|
77 <?php |
|
78 if (!empty($portfolioEMBED)) |
|
79 { |
|
80 ?> |
|
81 <div class="url-stuff fl" style="margin-top: 10px;margin-right:5px;margin-bottom:10px; width:100%;"> |
|
82 <?php echo $portfolioEMBED; ?> |
|
83 </div> |
|
84 <?php |
|
85 } |
|
86 ?> |
|
87 |
|
88 |
|
89 |
|
90 </div> |
|
91 |
|
92 <div class="col-570 fl"> |
|
93 <?php |
|
94 |
|
95 if($portfolioType == 'Image') |
|
96 { |
|
97 $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); |
|
98 ?> |
|
99 <a id="example1" class="lightbox-image mw570" href="<?php echo $image[0]; ?>"><img src="<?php echo $image[0]; ?>" alt="" /></a> |
|
100 <?php |
|
101 } |
|
102 // end if image |
|
103 |
|
104 //video portfolio |
|
105 if($portfolioType == 'Video') |
|
106 { |
|
107 $video_url= get_post_meta($post->ID, 'portfolio_video_url' , true); |
|
108 if(!empty($video_url)) |
|
109 { |
|
110 echo '<figure>'.$video_url.'</figure>'; |
|
111 } |
|
112 } |
|
113 // end if video |
|
114 |
|
115 //slideshow portfolio |
|
116 if($portfolioType == 'Slideshow') |
|
117 { |
|
118 $attachments = get_children(array('post_parent' => $post->ID, |
|
119 'post_status' => 'inherit', |
|
120 'post_type' => 'attachment', |
|
121 'post_mime_type' => 'image', |
|
122 'order' => 'ASC', |
|
123 'orderby' => 'menu_order ID')); |
|
124 |
|
125 |
|
126 |
|
127 echo '<div id="slides1">'; |
|
128 echo '<div class="slides_container">'; |
|
129 |
|
130 foreach($attachments as $att_id => $attachment) { |
|
131 $full_img_url = wp_get_attachment_url($attachment->ID); |
|
132 echo '<div class="slide">'; |
|
133 ?> |
|
134 <a href="#"><img src="<?php echo get_template_directory_uri(); ?>/scripts/timthumb.php?src=<?php echo $full_img_url; ?>&h=320&w=570&zc=1" title="" alt=""></a> |
|
135 <?php |
|
136 echo '</div>'; |
|
137 } //end foreach |
|
138 echo '</div>'; |
|
139 echo '</div>'; |
|
140 } |
|
141 ?> |
|
142 </div> |
|
143 <div class="clearfix"></div> |
|
144 <?php |
|
145 endwhile; |
|
146 ?> |
|
147 |
|
148 |