-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle_portfolio.php
146 lines (124 loc) · 6.82 KB
/
single_portfolio.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?php
/**
* @package WordPress
* @subpackage Apex_Theme
*/
?>
<?php get_header(); ?>
<?php
if ( function_exists( 'get_option_tree') ) {
$apex_foliosingledate = get_option_tree( 'value_portfoliosingledate' );
$apex_foliosinglepostinfo = get_option_tree('value_portfoliopostinfo', '', false, true );
if(!is_array($apex_foliosinglepostinfo)){ $apex_foliosinglepostinfo = array(); }
}
$apexlang_in = __('in', 'apex');
$apexlang_by = __('by', 'apex');
$templateurl = get_template_directory_uri();
$commentsvar = false;
$pagecustoms = getOptions();
if (isset($pagecustoms["header_title"])){$apex_htitle = $pagecustoms['header_title'];}else{$apex_htitle = "";}
if (isset($pagecustoms["sidebar_orientation"])){$apex_sideo = $pagecustoms['sidebar_orientation'];}else{$apex_sideo = 1;}
if ($apex_sideo == 0){$conorient = "right"; $sideoffset = ""; $conoffset = "offset-by-one";}else{$conorient = "left"; $sideoffset = "offset-by-one"; $conoffset = "";}
if (isset($pagecustoms["sidebar"])){$apex_sidebar = $pagecustoms["sidebar"];}else{$apex_sidebar = "Page Sidebar";}
?>
<!-- Page Title
================================================== -->
<div class="sixteen columns row divide notop">
<h3 class="titledivider"><?php echo $apex_htitle ?></h3>
<div class="dividerline"></div>
</div>
<!-- Content Holder -->
<div class="eleven columns <?php echo $conoffset ?> row content <?php echo $conorient ?>">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php
$blogimageurl = wp_get_attachment_url( get_post_thumbnail_id() );
$post_time_day = get_post_time('j', true);
$post_time_monthyear = get_post_time('M Y', true);
global $post;
$post_time_daymonthyear = date_i18n(get_option('date_format'), strtotime($post->post_date_gmt));
$posttags = get_the_tags();
$entrycategory = get_the_term_list( '', $pcat, '', ', ', '' );
$postcustoms = getOptions();
if (isset($postcustoms["postformat_type"])){$apex_postformat = $postcustoms['postformat_type'];}else{$apex_postformat = 0;}
if (isset($postcustoms["postformat_slider"])){
$slider_imagearr = $postcustoms['postformat_slider'];
$slider_imagelist = explode("\n", str_replace("\r", "", $slider_imagearr));
}else{
$slider_imagelist = 0;
}
if (isset($postcustoms["postformat_video"])){$apex_postvideo = $postcustoms['postformat_video'];}else{$apex_postvideo = "";}
?>
<!-- Blogpost -->
<div class="eleven columns row alpha blogpost noborderbottom <?php get_post_class(); ?>" id="post-<?php the_ID(); ?>">
<?php if($apex_postformat!=0){ ?>
<div class="eleven columns alpha blogimage">
<?php if($apex_postformat==1){ ?>
<?php echo '<img src="'.get_template_directory_uri().'/functions/thumb.php?src='.$blogimageurl.'&h=360&w=640&zc=1" alt="" class="scale-with-grid" />'; ?>
<?php } else if($apex_postformat==2){ ?>
<div class="flexslider clearfix">
<ul class="slides">
<?php foreach($slider_imagelist as $slider_image):
echo '<li><img src="'.$slider_image.'" alt="" /></li>';
endforeach; ?>
</ul>
</div>
<?php } else if($apex_postformat==3){ ?>
<div class="scalevid">
<iframe src="http://www.youtube.com/embed/<?php echo $apex_postvideo ?>?hd=1&wmode=opaque&controls=1&showinfo=0" width="640" height="360"></iframe>
</div>
<?php } else if($apex_postformat==4){ ?>
<div class="scalevid">
<iframe src="http://player.vimeo.com/video/<?php echo $apex_postvideo ?>?title=0&byline=0&portrait=0" width="640" height="360"></iframe>
</div>
<?php } ?>
</div>
<?php } ?>
<?php if($apex_foliosingledate == "Date Box"){ ?>
<div class="one column row alpha">
<div class="blogdate"><div class="day"><?php echo $post_time_day ?></div><span><?php echo $post_time_monthyear ?></span></div>
</div>
<div class="nine columns row offset-by-one omega">
<?php } else { ?>
<div class="eleven columns row alpha">
<?php } ?>
<div class="blogtitle"><h4><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h4></div>
<div class="postinfo">
<?php if (in_array("Date",$apex_foliosinglepostinfo)){ echo $post_time_daymonthyear ?> <span class="divide">|</span> <?php } ?>
<?php if (in_array("Categories",$apex_foliosinglepostinfo)){ echo $apexlang_in ?> <?php echo $entrycategory ?> <span class="divide">|</span> <?php } ?>
<?php if (in_array("Author",$apex_foliosinglepostinfo)){ echo $apexlang_by ?> <?php the_author(); ?> <span class="divide">|</span> <?php } ?>
<?php if (in_array("Comments",$apex_foliosinglepostinfo)){ if ( comments_open() ) : ?><?php comments_popup_link(__('No Comments', 'apex'), __('One Comment', 'apex'), __( '% Comments', 'apex')); ?> <span class="divide">|</span> <?php endif; } ?>
</div>
<div class="postcontent"><?php the_content(); ?></div>
</div>
<div class="clear"></div>
</div>
<!-- Post Comments -->
<?php comments_template('', true); ?>
<?php if($commentsvar) comment_form(); ?>
<!-- Post Comments End -->
<?php endwhile; ?>
<!-- Pagination -->
<?php if(function_exists('pagination')){ pagination(); }else{ paginate_links(); } ?>
<!-- Pagination End -->
<?php else : ?>
<div class="eleven columns alpha">
<p><?php _e('Oops, we could not find what you were looking for...', 'apex'); ?></p>
</div>
<?php endif; ?>
</div>
<!-- Sidebar
================================================== -->
<div class="four columns sidebar <?php echo $sideoffset ?> content">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar($apex_sidebar) ) : ?>
<div class="widget">
<h5>Sidebar Widget Area</h5>
<div>
Please configure this Widget Area in the Admin Panel under Appearance -> Widgets
</div>
<div class="clear"></div>
</div>
<?php endif; ?>
<div class="clear"></div>
</div>
<?php get_footer(); ?>