2023-05-02 09:23:01 +02:00
|
|
|
<h3 class="sr-only">Tags et catégories</h3>
|
2022-12-17 19:46:29 +01:00
|
|
|
<?php
|
|
|
|
if (has_category('chapters')) {
|
2023-05-02 09:23:01 +02:00
|
|
|
echo "<ul class='nolist' aria-labelledby='title-article-taxo-romans'>";
|
|
|
|
echo '<h4 class="sr-only" id="title-article-taxo-romans">Romans</h4>';
|
2022-12-17 19:46:29 +01:00
|
|
|
$romans = get_the_terms($post->ID, 'roman');
|
|
|
|
foreach( $romans as $roman ) {
|
2023-11-20 13:04:09 +01:00
|
|
|
echo "<li><a href= '" . esc_url( get_category_link( $roman->term_id ) ) . "' class='badge c-primary'><svg class='icon' alt=''><use xlink:href='#icon-folder'></use></svg> " . $roman->name . "</a></li>";
|
2022-12-17 19:46:29 +01:00
|
|
|
}
|
2023-05-02 09:23:01 +02:00
|
|
|
echo "</ul>";
|
2022-12-17 19:46:29 +01:00
|
|
|
} else {
|
|
|
|
$categories = get_the_category();
|
2023-05-02 09:23:01 +02:00
|
|
|
echo "<ul class='nolist' aria-labelledby='title-article-taxo-categories'>";
|
|
|
|
echo '<h4 class="sr-only" id="title-article-taxo-categories">Catégories</h4>';
|
2022-12-17 19:46:29 +01:00
|
|
|
foreach( $categories as $category ) {
|
2023-11-20 13:04:09 +01:00
|
|
|
echo "<li><a href= '" . esc_url( get_category_link( $category->term_id ) ) . "' class='badge c-primary'><svg class='icon' alt=''><use xlink:href='#icon-folder'></use></svg> " . $category->cat_name . "</a></li>";
|
2022-12-17 19:46:29 +01:00
|
|
|
}
|
2023-05-02 09:23:01 +02:00
|
|
|
echo "</ul>";
|
2022-12-17 19:46:29 +01:00
|
|
|
}
|
|
|
|
$tags = get_the_tags();
|
|
|
|
if ($tags) {
|
2023-05-02 09:23:01 +02:00
|
|
|
echo "<ul class='nolist' aria-labelledby='title-article-taxo-tags'>";
|
|
|
|
echo '<h4 class="sr-only" id="title-article-taxo-tags">Tags</h4>';
|
2022-12-17 19:46:29 +01:00
|
|
|
foreach( $tags as $tag ) {
|
2023-11-20 13:04:09 +01:00
|
|
|
echo "<li><a href= '" . esc_url( get_tag_link( $tag->term_id ) ) . "' class='badge c-secondary'><svg class='icon' alt=''><use xlink:href='#icon-tags'></use></svg> " . $tag->name . "</a></li>";
|
2022-12-17 19:46:29 +01:00
|
|
|
}
|
2023-05-02 09:23:01 +02:00
|
|
|
echo "</ul>";
|
2022-12-17 19:46:29 +01:00
|
|
|
}
|
|
|
|
?>
|