This repository was archived by the owner on Jul 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsingle-array-portfolio.php
More file actions
executable file
·80 lines (67 loc) · 2.59 KB
/
single-array-portfolio.php
File metadata and controls
executable file
·80 lines (67 loc) · 2.59 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
<?php
/**
* The template for displaying portfolio posts
*
* @since 1.0
*/
get_header(); ?>
<header class="page-titles">
<div class="container clearfix">
<div class="page-titles-wrap">
<h1 class="entry-title"><?php the_title(); ?></h1>
<!-- Page subtitle -->
<?php if ( get_post_meta( $post->ID, 'subtitle', true ) ) { ?>
<h3 class="entry-subtitle"><?php echo get_post_meta( $post->ID, 'subtitle', true ) ?></h3>
<?php } ?>
</div><!-- page titles wrap -->
<!-- Grab the video -->
<?php if ( get_post_meta( $post->ID, 'video', true ) ) { ?>
<div class="fitvid">
<?php echo get_post_meta( $post->ID, 'video', true ) ?>
</div>
<?php } else { ?>
<!-- Otherwise grab the gallery -->
<?php if ( 'gallery' == get_post_format() ) { ?>
<?php if ( function_exists( 'array_gallery' ) ) { array_gallery(); } ?>
<?php } else { ?>
<!-- If there is no gallery, just grab the featured image -->
<?php if ( has_post_thumbnail() ) { ?>
<div class="gallery-wrap clearfix">
<a class="featured-image" href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'north' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="bookmark"><?php the_post_thumbnail( 'large-image' ); ?></a>
</div>
<?php } ?>
<?php } ?>
<?php } ?>
</div><!-- container -->
</header><!-- page titles -->
<section class="main">
<div class="container">
<div id="content">
<div class="posts">
<!-- grab the posts -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<article <?php post_class('post'); ?>>
<div class="post-content">
<?php the_content(); ?>
</div>
</article>
<?php endwhile; ?>
<?php endif; ?>
</div><!-- posts -->
</div><!-- content -->
<div id="sidebar" class="sidebar-portfolio">
<div class="portfolio-details widget">
<ul>
<li><span><?php _e( 'Date:', 'north' ); ?></span> <?php echo get_the_date(); ?></li>
<!-- portfolio categories -->
<?php echo get_the_term_list( $post->ID, 'categories', '<li class="posted-in-cat"><span>' . __( 'Posted In:', 'north' ), ', ', '</span></li>' ); ?>
<!-- portfolio navigation -->
<?php next_post_link('%link', __('<li><span>Next:</span> %title </li>', 'north')) ?>
<?php previous_post_link('%link', __('<li><span>Previous:</span> %title</li>', 'north')) ?>
</ul>
</div>
</div><!-- sidebar -->
</div><!-- container -->
</section><!-- main -->
<!-- footer -->
<?php get_footer(); ?>