/
single-portfolio.php
99 lines (75 loc) · 2.03 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
<?php
/*
Template Name: Portfolio Single post
*/
?>
<?php get_header(); ?>
<?php the_post(); ?>
<div class="container breadcrump">
<div class="row">
<?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('<p id="breadcrumbs">','</p>');
}
?>
</div>
</div><!-- end breadcrump -->
<div class="container sub-nav">
<div class="row">
<div class="fourcol prev">
<?php echo previous_page_not_post('','',''); ?>
</div>
<div class="fourcol back">
<a href="site/portfolio-iso" title="Back to Portfolio" alt="Back to Portfolio">
<span></span>
</a>
</div>
<div class="fourcol last next">
<?php echo next_page_not_post('','',''); ?>
</div>
</div>
</div><!-- end container -->
<div class="container content">
<div class="row">
<div class="sixcol">
<?php
$mb = get_post_meta($post->ID, $custom_metabox->get_the_id(), true);
// $portfolioCF = mb['projects_img'];
echo $mb['projects_img'];
if ($portfolioCF != "") {
$images = explode(",", $portfolioCF);
foreach ($images as $image) {
?>
<img src="<?php
echo bloginfo('template_directory');
echo $image; ?>" alt="<?php the_title(); ?>" />
<?php
}
}
?>
</div>
<div class="sixcol last">
<?php
global $custom_metabox;
// get the meta data for the current post
$custom_metabox->the_meta('project_url');
print_r($custom_metabox) ;
?>
<h2><?php the_title(); ?></h2>
<div class="the_content"><?php the_content(); ?></div>
<?php
$projectUrl = get_post_meta($post->ID, 'project_url', true);
if ($projectUrl != "") {
?>
<a href="<?php echo get_post_meta($post->ID, 'project_url', true); ?>" class="btn btn-primary" rel="twipsy" title="Visit: <?php the_title(); ?>">Visit the website <i class="icon-share-alt icon-white"></i></a>
<?php
} else {
?>
<a class="btn btn-primary disabled">Visit the website <i class="icon-share-alt icon-white"></i></a>
<?php
}
?>
</div>
</div>
</div>
<?php get_footer(); ?>