2021-01-04 13:05:09 +01:00
|
|
|
<?php /* Template Name: page-romans */ ?>
|
|
|
|
<?php get_header(); ?> <!-- ouvrir header,php -->
|
|
|
|
<main>
|
|
|
|
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
|
|
|
|
|
|
|
|
<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-folder-open"></i> <?php echo the_title(); ?></span></li>
|
|
|
|
</ol>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php endwhile; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<div class="previews-section">
|
2021-01-28 19:50:41 +01:00
|
|
|
<?php $terms = get_terms(array('taxonomy' => 'roman','hide_empty' => false));?>
|
2021-01-04 13:05:09 +01:00
|
|
|
|
2021-01-28 19:41:11 +01:00
|
|
|
<?php if ( ! empty( $terms ) && is_array( $terms ) ) : ?>
|
|
|
|
<?php foreach ( $terms as $term ) : ?>
|
2021-01-04 13:05:09 +01:00
|
|
|
<article class="card card-preview card-primary">
|
|
|
|
<a href="<?php echo esc_url( get_term_link( $term ) ) ?>" class="preview-link">
|
|
|
|
<div class="preview-item">
|
2021-01-28 19:19:56 +01:00
|
|
|
<?php
|
2021-01-04 13:05:09 +01:00
|
|
|
$tag_id = $term->term_id;
|
|
|
|
$term_meta = get_option( "taxonomy_term_$tag_id" );
|
2021-01-28 19:19:56 +01:00
|
|
|
$coverimg = $term_meta['cover'];
|
|
|
|
echo '<div class="preview-content" style="background-image:url(\'' . $coverimg . '\');"></div>';
|
|
|
|
?>
|
2021-01-04 13:05:09 +01:00
|
|
|
<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>
|
2021-01-28 19:41:11 +01:00
|
|
|
<?php endforeach; ?>
|
|
|
|
<?php endif; ?>
|
2021-01-04 13:05:09 +01:00
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
|
|
|
|
<aside class="sidebar">
|
|
|
|
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
|
|
|
|
|
|
|
|
<div class="card card-info">
|
|
|
|
<div class="card-header"><i class="fa fa-folder-open"></i> <?php the_title(); ?></div>
|
|
|
|
<div class="card-body">
|
|
|
|
<?php the_content(); ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php endwhile; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<?php include(TEMPLATEPATH . '/components/sidebar-content.php'); ?>
|
|
|
|
</aside>
|
|
|
|
<?php get_footer(); ?>
|