diff --git a/posts.php b/posts.php index 0f69dc9665c592740e70d048cc62f34aa7bf6124..acbb74377e118b6fb40b43b6e8483d3491d47ee3 100644 --- a/posts.php +++ b/posts.php @@ -3,37 +3,26 @@ <section class="content"> <?php $title="Blog"; + $text=""; if (preg_match('/category.*/',current_url())){ echo "<p id='".current_url()."'></p>"; while(categories()){ echo "<p id='".category_url()."'></p>"; if(category_url() == "/".current_url()){ $title.=" - ".category_title(); + $text="<div class='wrap'><p>".category_description()."</p>"; + $text.="<p>Cette catégorie regroupe ".category_count()." ".pluralise(category_count(), "article", "s")."</p></div>"; } } } echo "<h1 style='text-align:center'>$title</h1>\n"; + echo $text; ?> <?php if(has_posts()): ?> <?php posts(); ?> <h2> Dernier article </h2> <?php include("single_article.php"); ?> - <!-- - <?php if (!preg_match('/category.*/',current_url())): ?> - <h2> Catégories d'articles </h2> - <ul style="list-style:none"> - <?php $i = 0; while(categories()): ?> - <?php if(category_count() > 0 ):?> - <li > - <?php include("single_category.php"); ?> - </li> - <?php endif; ?> - <?php endwhile; ?> - </ul> - <?php endif; ?> - --> - <?php if(total_posts() > 1 || $title=="Blog"):?> <h2> Articles précédents </h2> <ul class="items">