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

50 lines
1.1 KiB
PHP

<?php
/*
Template Name: Page Test
*/
?>
<?php get_header();
global $wp_query;
?>
<?php
$category = 'presentation';
$cat_obj = get_category_by_slug($category);
$count = $cat_obj->category_count;
$template = 'list-items-presentation';
$args = array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => 3,
'category_name' => $category
);
$arr_posts = new WP_Query($args);
$years = get_posts_years_array($cat_obj);
if ($arr_posts->have_posts()) :
?>
<div class="posts">
<div class="posts-list fw fw-container no-top-padding">
<div class="posts-list__wrapper wrapper">
<div class="posts-container" id="misha_posts_wrap">
<?php
set_query_var('arr_posts', $arr_posts);
get_template_part('partials/'.$template);
?>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php get_footer(); ?>