diff --git a/components/featured.php b/components/featured.php
index 741a3d4..122fddb 100644
--- a/components/featured.php
+++ b/components/featured.php
@@ -1,34 +1,39 @@
'post',
'tax_query' => array(
array(
- 'taxonomy' => 'category',
- 'terms' => 'blog',
+ 'taxonomy' => 'niveau',
+ 'terms' => 'featured',
'field' => 'slug',
)
),
'orderby' => 'date',
- 'post_count' => '1',
- 'order' => 'DESC',
- 'posts_per_page' => '1'
+ 'posts_per_page' => '3',
+ 'order' => 'DESC'
));
-
+
if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
-
-
-
-
-
- term_id ) ) . "' class='btn-small btn-info'> " . $category[0]->cat_name . ""; ?>
-
-
-
-
-
Lire l'article
-
-
+
+
+
+
+
+
+ " . $category[0]->cat_name . ""; ?>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/functions.php b/functions.php
index f97610f..a5994f5 100644
--- a/functions.php
+++ b/functions.php
@@ -26,6 +26,31 @@
* Permet d'afficher les niveaux de post pour les post features
*/
+ /* 2. Niveau support (for featured posts) */
+
+register_taxonomy(
+ 'niveau',
+ 'post',
+ array(
+ 'label' => 'Niveau',
+ 'labels' => array(
+ 'name' => 'Niveaux',
+ 'singular_name' => 'Niveaux',
+ 'all_items' => 'Tous les niveaux',
+ 'edit_item' => 'Éditer le niveau',
+ 'view_item' => 'Voir le niveau',
+ 'update_item' => 'Mettre à jour le niveau',
+ 'add_new_item' => 'Ajouter un niveau',
+ 'new_item_name' => 'Nouveau niveau',
+ 'search_items' => 'Rechercher parmi les niveaux',
+ 'popular_items' => 'Niveaux les plus utilisés'
+ ),
+ 'hierarchical' => false
+ )
+);
+
+register_taxonomy_for_object_type( 'niveau', 'post' );
+
// 1.1 - Enregistrement de la taxonomy pour le flag
register_taxonomy(
'flag',
diff --git a/home.php b/home.php
index 29d1edd..5b7b3d7 100644
--- a/home.php
+++ b/home.php
@@ -9,11 +9,11 @@
echo '' . $page->post_content . '
';
}
- echo '