Le theme de mon blog personnel, Kazhnuz Space
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.
 
 
 

66 lines
2.2 KiB

<?php get_header(); ?> <!-- ouvrir header,php -->
<main>
<?php $tag = get_category( get_query_var( 'roman' ) );
$tag_id = get_queried_object()->term_id;?>
<div class="flex-that">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="<?php echo site_url(); ?>">kazhnuz.space</a></li><li class="breadcrumb-item" aria-current="page"><span class="active"><i class="fa fa-book"></i> <?php echo single_cat_title(); ?></span></li>
</ol>
</nav>
<div class="rss">
<?php echo '<a href="' . get_tag_link( $tag_id ) . 'feed/" title="RSS de la categorie" class="btn btn-orange" /><i class="fa fa-rss"></i></a>'; ?>
</div>
</div>
<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 card-primary">
<div class="card-header"><i class="fa fa-list"></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(); ?>