-
Notifications
You must be signed in to change notification settings - Fork 1
/
archive-jetpack-portfolio.php
64 lines (57 loc) · 1.83 KB
/
archive-jetpack-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
<?php
/**
* The template for displaying the portfolio archive.
* Learn more: https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Billie
*/
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
if ( have_posts() ) {
?>
<header class="page-header">
<h1 class="page-title"><?php esc_html_e( 'Portfolio', 'billie' ); ?></h1>
</header><!-- .page-header -->
<section class="featured-wrap">
<?php
while ( have_posts() ) {
the_post();
?>
<div class="featured-post">
<?php
if ( has_post_thumbnail() ) {
$background = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'billie-featured-posts-thumb' );
echo '<div class="featured-inner" style="background: url(' . esc_url( $background[0] ) . ') center center no-repeat;">';
} else {
echo '<div class="featured-inner" style="background: ' . esc_attr( get_theme_mod( 'billie_header_bgcolor', '#9cc9c7' ) ) . ';">';
}
echo '<div class="post-header">';
the_title( sprintf( '<h2><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );
echo '</div>
<span class="featured-text">';
echo the_terms( $post->ID, 'jetpack-portfolio-type', '' . __( 'Project Type: ', 'billie' ), ', ', '' );
echo ' <span class="tag-list">';
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
$time_string = sprintf(
$time_string,
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() )
);
$posted_on = $time_string;
echo $posted_on;
echo '</span></span></div></div>';
}
?>
</section>
<?php
} else {
get_template_part( 'content', 'none' );
}
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();