2022-05-11 20:40:41 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* The template for displaying archive of profiles for the shelf taxonomy
|
|
|
|
*
|
|
|
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
|
|
|
*
|
|
|
|
* @package WordPress
|
|
|
|
* @subpackage Twenty_Nineteen
|
|
|
|
* @since 1.0.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
get_header();
|
|
|
|
|
|
|
|
$termid = get_queried_object()->term_id;
|
|
|
|
$term = get_term_by( 'id', $termid, 'shelf' );
|
|
|
|
?>
|
|
|
|
|
|
|
|
<section id="primary" class="content-area">
|
|
|
|
<main id="main" class="site-main">
|
|
|
|
<article class="entry">
|
|
|
|
<header class="entry-header">
|
2023-01-12 20:14:23 +00:00
|
|
|
<h1 class="entry-title">
|
|
|
|
<?php echo wasmo_get_icon_svg( 'shelf', 36 ); ?>
|
|
|
|
<?php echo wp_kses_post( $term->name ); ?>
|
|
|
|
</h1>
|
2023-01-13 22:17:06 +00:00
|
|
|
<h2 class="entry-description has-regular-font-size"><?php echo wp_kses_post( $term->description ); ?></h2>
|
2022-05-11 20:52:02 +00:00
|
|
|
<?php
|
|
|
|
// TODO:
|
|
|
|
// Add blog posts relevant to this shelf item.
|
|
|
|
// Add links relevant to the shelf item - these can be added to the term description.
|
|
|
|
?>
|
2022-05-11 20:40:41 +00:00
|
|
|
<hr />
|
2023-01-13 22:17:06 +00:00
|
|
|
<h3 class="has-small-font-size">Profiles with <em><?php echo wp_kses_post( $term->name ); ?></em> on their "shelf":</h3>
|
2022-05-11 20:40:41 +00:00
|
|
|
</header><!-- .page-header -->
|
|
|
|
|
|
|
|
<?php
|
|
|
|
// use directory template with taxonomy context and pass in term
|
2022-10-26 20:51:37 +00:00
|
|
|
set_query_var( 'context', 'tax' );
|
2022-05-11 20:40:41 +00:00
|
|
|
set_query_var( 'tax', 'shelf' );
|
|
|
|
set_query_var( 'termid', $termid );
|
|
|
|
get_template_part( 'template-parts/content/content', 'directory' );
|
|
|
|
?>
|
|
|
|
|
|
|
|
<footer class="entry-footer">
|
2023-01-12 20:14:23 +00:00
|
|
|
<h3>
|
|
|
|
<?php echo wasmo_get_icon_svg( 'shelf', 24, 'style="margin-top:-3px;margin-right:0;"' ); ?>
|
2023-01-13 22:17:06 +00:00
|
|
|
Mormon shelf items:
|
2023-01-12 20:14:23 +00:00
|
|
|
</h3>
|
2022-10-26 20:51:37 +00:00
|
|
|
<ul class="tags">
|
|
|
|
<?php
|
|
|
|
$terms = get_terms([
|
|
|
|
'taxonomy' => 'shelf',
|
|
|
|
'hide_empty' => false,
|
|
|
|
'orderby' => 'name',
|
|
|
|
'order' => 'ASC'
|
|
|
|
]);
|
|
|
|
foreach ( $terms as $term ) :
|
2023-01-13 22:17:06 +00:00
|
|
|
// if ( $termid !== $term->term_id ) : // don't skip this term so the ordering doesn't shuffle
|
2022-10-26 20:51:37 +00:00
|
|
|
?>
|
|
|
|
<li><a class="tag" data-id="<?php echo esc_attr( $term->term_id) ?>" href="<?php echo get_term_link( $term ); ?>"><?php echo $term->name; ?></a></li>
|
|
|
|
<?php
|
2023-01-13 22:17:06 +00:00
|
|
|
// endif;
|
2022-10-26 20:51:37 +00:00
|
|
|
endforeach;
|
|
|
|
?>
|
|
|
|
</ul>
|
2023-01-12 20:14:23 +00:00
|
|
|
|
|
|
|
<?php
|
|
|
|
// load related posts for this term
|
|
|
|
get_template_part( 'template-parts/content/taxonomy', 'relatedposts' );
|
|
|
|
?>
|
2022-05-11 20:40:41 +00:00
|
|
|
</footer>
|
|
|
|
|
|
|
|
</article>
|
|
|
|
|
|
|
|
</main><!-- #main -->
|
|
|
|
</section><!-- #primary -->
|
|
|
|
|
|
|
|
<?php
|
|
|
|
get_footer();
|