ldc-groupe/content/themes/ldc/category-events.php
Vincent BRIDIER 134507db43 - Backup DEV
- Add DotEnv
- Fix Bato
- Etc..
2020-05-04 15:59:02 +02:00

91 lines
No EOL
2.5 KiB
PHP

<?php
/*
Template Name: Page News
*/
?>
<?php
get_header();
global $tp;
$term = get_queried_object();
$hero = get_field('hero', $term);
$args = array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => -1,
);
$arr_posts = new WP_Query( $args);
$term = get_queried_object();
$cat_obj = get_category_by_slug($term->slug);
$years = get_posts_years_array($cat_obj);
$count = $cat_obj->category_count;
?>
<?php
set_query_var('hero', get_field('hero', $term));
get_template_part('partials/hero');
?>
<?php get_template_part('partials/breadcrumbs'); ?>
<?php if ($arr_posts->have_posts()) : ?>
<div class="filter-posts">
<!-- <div class="filter fw fw-container no-bottom-padding">
<div class="filter__wrapper wrapper">
<div class="filter-menu">
<div class="filter__select-wrap filter-select-wrap">
<ul class="filter-select">
<li>
<a>Thématique</a>
<?php tags_filter('events') ?>
</li>
</ul>
<ul class="filter-select">
<li>
<a>Année</a>
<?php filter_years_html($years, $term->slug) ?>
</li>
</ul>
</div>
<div class="filter-results-num">
Résultat : <span class="filter-results-num__wrap"><span class="filter-results-num__current">3</span> documents sur <span class="filter-results-num__total"><?php echo $count ?></span></span>
</div>
</div>
<div class="active-filters">
<div class="active-filters__list">
<div class="active-filters__item"><a class="active-filters__item-remove">&#10006;</a> Finance</div>
</div>
<div class="active-filters__clear-wrap">
<div class="active-filters__item active-filters__item_clear"><a class="active-filters__item-remove clear-all">&#10006;</a> Effacer les filtres</div>
</div>
</div>
</div>
</div>
-->
<div class="posts-list fw tagged-posts">
<div class="posts-list__wrapper wrapper">
<div class="list-items posts-container" id="#posts-container">
<?php
set_query_var('numberposts', -1);
get_template_part('partials/list-items-events');
?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php get_footer(); ?>