communiques page added
This commit is contained in:
parent
d1f22dd5b9
commit
99c236d46c
|
@ -0,0 +1,56 @@
|
||||||
|
<?php
|
||||||
|
/*
|
||||||
|
Template Name: Comuniqués
|
||||||
|
*/
|
||||||
|
get_header(); ?>
|
||||||
|
<h3>Check:</h3>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<section class="archive-year">
|
||||||
|
<?php //wp_get_archives('type=yearly'); ?>
|
||||||
|
</section>
|
||||||
|
-->
|
||||||
|
<?php
|
||||||
|
// the query
|
||||||
|
// get all posts in category with slug "communiques"
|
||||||
|
|
||||||
|
$wpb_com_query = new WP_Query(array('category_name'=>'communiques', 'post_status'=>'publish', 'posts_per_page'=>-1)); ?>
|
||||||
|
|
||||||
|
<?php while ( $wpb_all_query->have_posts() ) : $wpb_all_query->the_post(); ?>
|
||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$arc = get_the_title();
|
||||||
|
|
||||||
|
if ( strcmp( $arc ,"Archives") ) {
|
||||||
|
echo "
|
||||||
|
<article>
|
||||||
|
<a href=" . get_the_permalink() . ">
|
||||||
|
<h3>" . get_the_title() . "</h3></a>
|
||||||
|
" . get_the_excerpt();
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<?php
|
||||||
|
$categories = get_the_category();
|
||||||
|
if ( ! empty( $categories ) ) {
|
||||||
|
$art_cat_link = esc_url( get_category_link( $categories[0]->term_id ));
|
||||||
|
$art_cat_name = esc_html( $categories[0]->name );
|
||||||
|
$art_permalink = get_the_permalink();
|
||||||
|
$post_date = get_the_date( 'j F o' );
|
||||||
|
|
||||||
|
echo "
|
||||||
|
<span>$post_date</span>
|
||||||
|
<a href='". $art_permalink ."'>
|
||||||
|
<span class='dtlink'>Lire la suite</span>
|
||||||
|
</a>";
|
||||||
|
} ?>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<?php endwhile; ?>
|
||||||
|
<?php get_footer(); ?>
|
Loading…
Reference in New Issue