fix: fix categories btn

This commit is contained in:
Kazhnuz 2023-11-20 13:05:35 +01:00
parent f14e5e9838
commit 7e218e0c1c

View file

@ -5,7 +5,7 @@
echo '<h4 class="sr-only" id="title-article-taxo-romans">Romans</h4>'; echo '<h4 class="sr-only" id="title-article-taxo-romans">Romans</h4>';
$romans = get_the_terms($post->ID, 'roman'); $romans = get_the_terms($post->ID, 'roman');
foreach( $romans as $roman ) { foreach( $romans as $roman ) {
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>&nbsp;" . $roman->name . "</a></li>"; echo "<li><a href= '" . esc_url( get_category_link( $roman->term_id ) ) . "' class='btn btn-small c-primary'><svg class='icon' alt=''><use xlink:href='#icon-folder'></use></svg>&nbsp;" . $roman->name . "</a></li>";
} }
echo "</ul>"; echo "</ul>";
} else { } else {
@ -13,7 +13,7 @@
echo "<ul class='nolist' aria-labelledby='title-article-taxo-categories'>"; echo "<ul class='nolist' aria-labelledby='title-article-taxo-categories'>";
echo '<h4 class="sr-only" id="title-article-taxo-categories">Catégories</h4>'; echo '<h4 class="sr-only" id="title-article-taxo-categories">Catégories</h4>';
foreach( $categories as $category ) { foreach( $categories as $category ) {
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>&nbsp;" . $category->cat_name . "</a></li>"; echo "<li><a href= '" . esc_url( get_category_link( $category->term_id ) ) . "' class='btn btn-small c-primary'><svg class='icon' alt=''><use xlink:href='#icon-folder'></use></svg>&nbsp;" . $category->cat_name . "</a></li>";
} }
echo "</ul>"; echo "</ul>";
} }
@ -22,7 +22,7 @@
echo "<ul class='nolist' aria-labelledby='title-article-taxo-tags'>"; echo "<ul class='nolist' aria-labelledby='title-article-taxo-tags'>";
echo '<h4 class="sr-only" id="title-article-taxo-tags">Tags</h4>'; echo '<h4 class="sr-only" id="title-article-taxo-tags">Tags</h4>';
foreach( $tags as $tag ) { foreach( $tags as $tag ) {
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>&nbsp;" . $tag->name . "</a></li>"; echo "<li><a href= '" . esc_url( get_tag_link( $tag->term_id ) ) . "' class='btn btn-small c-secondary'><svg class='icon' alt=''><use xlink:href='#icon-tags'></use></svg>&nbsp;" . $tag->name . "</a></li>";
} }
echo "</ul>"; echo "</ul>";
} }