-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsingle-portfolio.php
109 lines (83 loc) · 2.68 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
<?php
/**
* The template for displaying single portfolios.
*
* Learn more: https://codex.wordpress.org/Template_Hierarchy
*
* @package Forest
*/
get_header(); ?>
<div id="primary" class="portfolio-content hfeed">
<?php
while ( have_posts() ) :
the_post();
?>
<?php stag_post_before(); ?>
<div class="portfolio-hero the-hero-<?php the_ID(); ?>">
<div class="portfolio-cover the-cover-<?php the_ID(); ?>"></div>
<div class="inside">
<div class="grids">
<h1 class="entry-title grid-9">
<?php the_title(); ?>
</h1>
<div class="grid-3">
<nav class="portfolio-navigation">
<?php if ( '' !== forest_get_thememod_value( 'forest_portfolio_page' ) && '-1' !== forest_get_thememod_value( 'forest_portfolio_page' ) ) : ?>
<li><a href="<?php echo esc_url( get_page_link( forest_get_thememod_value( 'forest_portfolio_page' ) ) ); ?>"><i class="icon-grid"></i></a></li>
<?php endif; ?>
<?php
$prev = get_adjacent_post( false, '', false );
$next = get_adjacent_post( false, '', true );
?>
<?php if ( is_object( $prev ) && $prev->ID !== get_the_ID() ) : ?>
<li><a href="<?php echo esc_url( get_permalink( $prev->ID ) ); ?>"><i class="icon-previous"></i></a></li>
<?php endif; ?>
<?php if ( is_object( $next ) && $next->ID !== get_the_ID() ) : ?>
<li><a href="<?php echo esc_url( get_permalink( $next->ID ) ); ?>"><i class="icon-next"></i></a></li>
<?php endif; ?>
</nav>
</div>
</div>
<?php
$image_ids = explode( ',', get_post_meta( get_the_ID(), '_stag_image_ids', true ) );
if ( $image_ids[0] !== '' ) :
?>
<div class="flexslider portfolio-slider">
<ul class="slides">
<?php
foreach ( $image_ids as $image ) {
if ( ! $image ) {
continue;
}
$src = wp_get_attachment_image_src( $image, 'full' );
echo "<li><img src='{$src[0]}' width='{$src[1]}' height='{$src[2]}'></li>";
}
?>
</ul>
</div><!-- /#portfolio-slider -->
<?php endif; ?>
</div>
</div><!-- /.portfolio-hero -->
<div class="inside">
<div class="entry-content grids">
<div class="project-content grid-9">
<div class="project-content-inner">
<?php
the_content( __( 'Continue Reading <span class="meta-nav">→</span>', 'forest' ) );
wp_link_pages(
array(
'before' => '<p><strong>' . __( 'Pages:', 'forest' ) . '</strong> ',
'after' => '</p>',
'next_or_number' => 'number',
)
);
?>
</div>
</div>
<?php get_template_part( 'helper', 'portfolio-sidebar' ); ?>
</div>
</div>
<?php stag_post_after(); ?>
<?php endwhile; ?>
</div><!-- #primary -->
<?php get_footer(); ?>