Le nouveau theme wordpress de Quarante-Douze
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
qdouze2-wordpress-theme/taxonomy-roman.php

55 lines
1.6 KiB

<?php get_header(); ?> <!-- ouvrir header,php -->
<main>
<?php kspace_cat_breadcrumb(single_cat_title('', false), 'book'); ?>
<img class="cover" src="<?php
$term_meta = get_option( "taxonomy_term_$tag_id" );
echo $term_meta['cover'];
?>">
<div class="roman">
<div class="card">
<h1><?php echo single_cat_title(); ?></h1>
<div class="card-body">
<?php echo tag_description();?>
</div>
</div>
<?php
$args = array(
'tax_query' => array(
array(
'taxonomy' => 'roman',
'field' => 'term_id',
'terms' => $tag_id // you need to know the term_id of your term "example 1"
),
),
'posts_per_page' => -1,
'order' => 'ASC',
);
$query = new WP_Query( $args );
?>
<div class="card head-primary">
<div class="card-header"><i class="fa fa-list" aria-hidden="true"></i> Chapitres</div>
<div class="card-menu">
<?php if($query->have_posts()) : ?>
<?php $i = 1; ?>
<?php while($query->have_posts()) : $query->the_post(); ?>
<a href="<?php the_permalink(); ?>" class="menu-element">
<span class="text-dark">
<strong>Chapitre <?php echo $i++; ?>.</strong>
<?php the_title(); ?>
</span>
<span>
<em class="text-dark"><?php the_time('d/m/Y') ?></em>
</span>
</a>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
</div>
</main>
<?php get_sidebar(); ?>
<?php get_footer(); ?>