-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle_portfolio.php
More file actions
165 lines (136 loc) · 7.27 KB
/
Copy pathsingle_portfolio.php
File metadata and controls
165 lines (136 loc) · 7.27 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<script type="text/javascript">
jQuery(document).ready(function($){
$('#slider').anythingSlider({
// mode : 'f',
hashTags : false,
expand : true,
autoPlay : true,
resizeContents : false,
pauseOnHover : true,
buildArrows : false,
buildNavigation : false,
delay : 5000,
resumeDelay : 0,
animationTime : 500,
delayBeforeAnimate:0,
easing : 'easeInOutQuint',
onSlideBegin : function(e, slider) {
$('.nextbutton').fadeOut();
$('.prevbutton').fadeOut();
},
onSlideComplete : function(slider) {
$('.nextbutton').fadeIn();
$('.prevbutton').fadeIn();
}
})
$('.blogsingleimage').hover(function() {
$(".slideforward").stop(true, true).fadeIn();
$(".slidebackward").stop(true, true).fadeIn();
}, function() {
$(".slideforward").fadeOut();
$(".slidebackward").fadeOut();
});
$(".pauseButton").toggle(function(){
$(this).attr("class", "playButton");
$('#slider').data('AnythingSlider').startStop(false); // stops the slideshow
},function(){
$(this).attr("class", "pauseButton");
$('#slider').data('AnythingSlider').startStop(true); // start the slideshow
});
$(".slideforward").click(function(){
$('#slider').data('AnythingSlider').goForward();
});
$(".slidebackward").click(function(){
$('#slider').data('AnythingSlider').goBack();
});
});
</script>
<div id="mainwrap">
<div id="main" class="portsingle">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $portfolio = get_post_custom($post->ID); ?>
<div class="pad"></div>
<div class="content fullwidth">
<div class="blogpost postcontent port" >
<div class="projectdetails">
<div class="blogsingleimage">
<?php
$args = array(
'post_type' => 'attachment',
'numberposts' => null,
'post_status' => null,
'post_parent' => $post->ID,
'orderby' => 'menu_order ID',
);
$attachments = get_posts($args);
if ($attachments) {?>
<div id="slider" class="slider">
<?php
$i = 0;
foreach ($attachments as $attachment) {
//echo apply_filters('the_title', $attachment->post_title);
$image = wp_get_attachment_image_src( $attachment->ID, 'full' ); ?>
<div>
<img class="check" src="<?php echo get_template_directory_uri() ?>/js/timthumb.php?src=<?php echo $image[0] ?>&w=750" />
</div>
<?php
$i++;
} ?>
</div>
<?php if($i > 1){ ?>
<div class="prevbutton slidebackward port"></div>
<div class="nextbutton slideforward port"></div>
<?php } ?>
<?php } else {
$image_name = 'feature-image-2'; // sets image name as feature-image-1, feature-image-2 etc.
if (MultiPostThumbnails::has_post_thumbnail('portfolioentry', $image_name)) {
$image_id = MultiPostThumbnails::get_post_thumbnail_id( 'portfolioentry', $image_name, $post->ID ); // use the MultiPostThumbnails to get the image ID
$image_feature_url = wp_get_attachment_image_src( $image_id,'feature-image' ); // define full size src based on image ID
$image = $image_feature_url[0];
}
else{
$image = get_template_directory_uri() . '/images/placeholder-port.png';
}?>
<a href="<?php echo $image ?>" rel="lightbox[port]" title="<?php the_title(); ?>"><img src="<?php echo get_template_directory_uri() ?>/js/timthumb.php?src=<?php echo $image ?>&w=750" /></a>
<?php } ?>
</div>
</div>
<div class="projectdescription">
<h2><?php if (!function_exists('icl_object_id') or (ICL_LANGUAGE_CODE == $sitepress->get_default_language()) ) { echo stripText($pmc_data['port_project_details']); } else { _e('Project details:','wp-studio'); } ?></h2>
<div class="datecomment">
<p>
<?php if($portfolio['detail_active'][0]) {
if($portfolio['detail_active'][0]) { ?>
<?php if (!function_exists('icl_object_id') or (ICL_LANGUAGE_CODE == $sitepress->get_default_language()) ) { echo stripText($pmc_data['port_project_url']); } else { _e('Project URL:','wp-studio'); } ?> <span class="link"><a target="_blank" href="http://<?php echo $portfolio['website_url'][0] ?>" title="project url"><?php echo $portfolio['website_url'][0] ?></a></span> </br>
<?php } else { ?>
<?php if (!function_exists('icl_object_id') or (ICL_LANGUAGE_CODE == $sitepress->get_default_language()) ) { echo stripText($pmc_data['port_project_url']); } else { _e('Project URL:','wp-studio'); } ?> <span class="link"><a title="project url"><?php echo $portfolio['website_url'][0] ?></a></span>
<?php } ?>
<?php } ?>
<?php if($portfolio['author'][0] !='') {?>
<?php if (!function_exists('icl_object_id') or (ICL_LANGUAGE_CODE == $sitepress->get_default_language()) ) { echo stripText($pmc_data['port_project_designer']); } else { _e('Project designer:','wp-studio'); } ?> <span class="authorp port"><?php echo $portfolio['author'][0] ?></span><br>
<?php } ?>
<?php if($portfolio['date'][0] !='') {?>
<?php if (!function_exists('icl_object_id') or (ICL_LANGUAGE_CODE == $sitepress->get_default_language()) ) { echo stripText($pmc_data['port_project_date']); } else { _e('Date of completion:','wp-studio'); } ?> <span class="posted-date port"><?php echo $portfolio['date'][0] ?></span><br>
<?php } ?>
<?php if($portfolio['customer'][0] !='') {?>
<?php if (!function_exists('icl_object_id') or (ICL_LANGUAGE_CODE == $sitepress->get_default_language()) ) { echo stripText($pmc_data['port_project_client']); } else { _e('Client:','wp-studio'); } ?> <span class="author port"><?php echo $portfolio['customer'][0] ?></span><br>
<?php } ?>
</p>
</div>
<div class="posttext">
<h2><?php if (!function_exists('icl_object_id') or (ICL_LANGUAGE_CODE == $sitepress->get_default_language()) ) { echo stripText($pmc_data['port_project_description']); } else { _e('Project description:','wp-studio'); } ?></h2>
<div> <?php the_content(); ?> </div>
</div>
<h2 class="portsingleshare"><?php if (!function_exists('icl_object_id') or (ICL_LANGUAGE_CODE == $sitepress->get_default_language()) ) { echo stripText($pmc_data['port_project_share']); } else { _e('Share the <span>project</span>','wp-studio'); } ?></h2>
<div class="socialsingle"><?php socialLinkSingle() ?></div>
<div class = "portnavigation">
<div class="portprev"><span title="<?php if (!function_exists('icl_object_id') or (ICL_LANGUAGE_CODE == $sitepress->get_default_language()) ) { $next = stripText($pmc_data['translation_next_project']); } else { $next = __('Next project','wp-studio'); } echo $next; ?>"><?php previous_post_link('%link', $next ,false,''); ?> </span></div>
<div class="portnext"><span title="<?php if (!function_exists('icl_object_id') or (ICL_LANGUAGE_CODE == $sitepress->get_default_language()) ) { $prev = stripText($pmc_data['translation_previus_project']); } else { $prev = __('Previous project','wp-studio'); } echo $prev; ?>"><?php next_post_link('%link',$prev,false,''); ?> </span></div>
</div>
</div>
</div>
</div>
<?php endwhile; else: ?>
<?php endif; ?>
</div>
</div>