-
Notifications
You must be signed in to change notification settings - Fork 2
/
single-portfolio.php
93 lines (83 loc) · 3.41 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
<?php
/**
* The template for displaying all single posts and attachments
*
* @package FoundationPress
* @since FoundationPress 1.0.0
*/
get_header(); ?>
<?php if( get_theme_mod('internal-title-bar') != '' ) {
get_template_part( 'template-parts/portfolio-title-bar' );
} ?>
<div id="single-post" class="page-full-width max-width-sixteen-hundred no-sidebar" role="main">
<?php do_action( 'foundationpress_before_content' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<section <?php post_class('main-content') ?> id="post-<?php the_ID(); ?>">
<?php if( get_theme_mod('internal-breadcrumbs') != '' ) {
if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<nav aria-label="You are here:" role="navigation"> <ul class="breadcrumbs">','</ul></nav>'); }
} ?>
<?php if( get_theme_mod('internal-title-bar') == '' ) { ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php } ?>
<?php do_action( 'foundationpress_post_before_entry_content' ); ?>
<div class="entry-content">
<?php
global $post;
$description = get_field('bs_portfolio_description');
$gallery = get_field('bs_portfolio_gallery');
$completed = get_field('bs_portfolio_completed');
$budget = get_field('bs_portfolio_budget');
$tax_terms = get_the_terms( $post->ID , 'portfolio-cat' );
?>
<div class="portfolio-wrap">
<div class="portfolio-main-image">
<?php if($gallery) { ?>
<ul class="portfolio-gallery">
<?php foreach( $gallery as $image ): ?>
<li>
<a href="<?php echo $image['url']; ?>" class="swipebox">
<img src="<?php echo $image['sizes']['portfolio-gallery']; ?>" alt="<?php $image['alt']; ?>">
</a>
</li>
<?php endforeach; ?>
</ul>
<?php } ?>
</div>
<div class="portfolio-description">
<div class="portfolio-description-inner">
<h2 class="portfolio-title"><?php the_title(); ?></h2>
<?php if($completed) { ?>
<p><strong>Completed:</strong> <?php echo $completed; ?></p>
<?php } ?>
<?php if($budget) { ?>
<p><strong>Budget:</strong> $<?php echo $budget; ?></p>
<?php } ?>
<p><strong>Category:</strong> <?php foreach ($tax_terms as $tax_term) { echo '<span class="term-name">' . $tax_term->name . '</span>'; } ?></p>
<?php if($description) { ?>
<p><strong>Features:</strong> <?php echo $description; ?></p>
<?php } ?>
<?php $posttags = get_the_tags(); if ($posttags) { ?>
<div class="the-tags">
<?php foreach($posttags as $tag) {
echo '<a href="' . get_bloginfo('url') . '/tag/' . $tag->slug . '"><span class="tag">#' . $tag->slug . '</a></span>';
} ?>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
<nav id="nav-single" class="nav-single">
<div class="nav-single-inner">
<span class="nav-previous"><?php next_post_link( '%link', '<span class="meta-nav">' . _x( '«', 'Previous post link', 'allonsy' ) . '</span> %title' ); ?></span>
<span class="nav-next"><?php previous_post_link( '%link', '%title <span class="meta-nav">' . _x( '»', 'Next post link', 'allonsy' ) . '</span>' ); ?></span>
</div>
</nav><!-- .nav-single -->
<?php do_action( 'foundationpress_post_before_comments' ); ?>
<?php comments_template(); ?>
<?php do_action( 'foundationpress_post_after_comments' ); ?>
</section>
<?php endwhile;?>
<?php do_action( 'foundationpress_after_content' ); ?>
</div>
<?php get_footer();