2022-12-17 19:46:29 +01:00
|
|
|
<?php /* Template Name: page-romans */ ?>
|
|
|
|
<?php get_header(); ?> <!-- ouvrir header,php -->
|
2023-05-02 11:31:38 +02:00
|
|
|
<main id="skip">
|
2022-12-17 19:46:29 +01:00
|
|
|
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
|
|
|
|
<?php kspace_cat_breadcrumb('Romans', 'book'); ?>
|
|
|
|
|
|
|
|
<?php endwhile; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<div class="previews-section">
|
|
|
|
<?php $terms = get_terms(array('taxonomy' => 'roman','hide_empty' => false));?>
|
|
|
|
|
|
|
|
<?php if ( ! empty( $terms ) && is_array( $terms ) ) : ?>
|
|
|
|
<?php foreach ( $terms as $term ) : ?>
|
2022-12-17 22:34:02 +01:00
|
|
|
<article class="card card-preview head-primary">
|
2022-12-17 19:46:29 +01:00
|
|
|
<a href="<?php echo esc_url( get_term_link( $term ) ) ?>" class="preview-link">
|
|
|
|
<div class="preview-item">
|
|
|
|
<?php
|
|
|
|
$tag_id = $term->term_id;
|
|
|
|
$term_meta = get_option( "taxonomy_term_$tag_id" );
|
|
|
|
$coverimg = $term_meta['cover'];
|
|
|
|
echo '<div class="preview-content" style="background-image:url(\'' . $coverimg . '\');"></div>';
|
|
|
|
?>
|
|
|
|
<div class="preview-overlay">
|
|
|
|
<h1 class="card-header"><?php echo $term->name; ?></h1>
|
|
|
|
<div class="preview-metadata">
|
|
|
|
<div class="metadata-pills">
|
|
|
|
</div>
|
|
|
|
<div class="comment-text"><?php echo $term->count; ?> Chapitres</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</article>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
|
|
|
|
<aside class="sidebar">
|
|
|
|
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
|
|
|
|
|
2022-12-17 22:34:02 +01:00
|
|
|
<div class="card head-info">
|
2023-10-16 08:32:58 +02:00
|
|
|
<div class="card-header"><i class="icon-folder-open" aria-hidden="true"></i> <?php the_title(); ?></div>
|
2022-12-17 19:46:29 +01:00
|
|
|
<div class="card-body">
|
|
|
|
<?php the_content(); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php endwhile; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<?php include(TEMPLATEPATH . '/components/sidebar-content.php'); ?>
|
|
|
|
</aside>
|
|
|
|
<?php get_footer(); ?>
|