-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive-factory.php
59 lines (57 loc) · 1.66 KB
/
archive-factory.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
<?php
/**
Template Name: Archives Facrtory Items
*/
get_header(); ?>
<div class="site-content">
<div class="grid container">
<article>
<nav class="breadcrumbs">
<span class="breadcrumbs--item"><a href="<?php echo esc_url( home_url( '/' ) ); ?>">SoaPatrick</a></span>
<span class="breadcrumbs--item__last">Factory</span>
</nav>
<header class="page-header">
<h1 class="title-large">Factory</h1>
</header>
<hr>
<div class="tags-wrapper">
<?php
$args = array(
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => TRUE,
'fields' => 'all',
);
$terms = get_terms( 'factory_tags', $args);
foreach ( $terms as $term ) {
$url = get_term_link( $term );
if ( is_wp_error( $url ) ) {
continue;
}
printf(
'<a href="%s" class="btn btn-small">%s</a>',
$url,
$term->name
);
}
?>
</div>
<div class="page-content page-content--factory">
<?php
if ( have_posts() ) :
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content', 'factory' );
endwhile;
endif; ?>
</div>
</article>
<nav class="navigation posts-navigation">
<div class="nav-links">
<div class="nav-next"><?php previous_posts_link( 'Newer Factory Items' ); ?></div>
<div class="nav-previous"><?php next_posts_link( 'Older Factory Items', '' ); ?></div>
</div>
</nav>
</div>
</div>
<?php
get_footer();