-
Notifications
You must be signed in to change notification settings - Fork 1
/
taxonomy-jetpack-portfolio-tag.php
46 lines (42 loc) · 1.44 KB
/
taxonomy-jetpack-portfolio-tag.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
<?php
/**
* The template for displaying archive pages for the portfolio types.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package Timber Lite
* @since Timber 1.0
*/
if ( ! defined( 'ABSPATH' ) ){
exit; // Exit if accessed directly
}
get_header(); ?>
<div class="site-header site-header--placeholder"></div>
<div class="site-container">
<div class="site-content portfolio-archive portfolio-category">
<?php
$data = '';
if ( have_posts() ) {
$queried_object = get_queried_object();
if ( ! empty( $queried_object->taxonomy ) ) {
$data .= ' data-taxonomy="' . esc_attr( $queried_object->taxonomy ) .'"';
$data .= ' data-termid="' . esc_attr( $queried_object->term_taxonomy_id ) .'"';
}
} ?>
<div class="site-sidebar site-sidebar--archive">
<h1 class="site-sidebar__content site-sidebar__text"><?php $portfolio_tag = get_queried_object(); echo esc_html( $portfolio_tag->name ); ?></h1>
</div>
<div class="portfolio-wrapper" <?php echo $data; ?>>
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content', 'portfolio' );
endwhile;
else :
get_template_part( 'template-parts/content', 'none' );
endif;
?>
</div>
</div>
</div>
<?php get_footer();