This repository has been archived on 2024-04-03. You can view files and clone it, but cannot push or open issues or pull requests.
qdouze2-wordpress-theme/components/sidebar/categories.php

17 lines
629 B
PHP
Raw Normal View History

2022-12-17 19:46:29 +01:00
<div class="card card-primary">
<div class="card-header"><i class="fa fa-folder" aria-hidden="true"></i> Catégories</div>
<ul class="card-menu">
<?php
$categories = get_categories( array(
'orderby' => 'name',
'order' => 'ASC'
) );
foreach( $categories as $category ) {
if ($category->slug != "blog" && $category->slug != "chapters") {
echo '<li><a class="menu-element" href="' . get_category_link($category->term_id) . '">' . $category->name . '<span class="menu-label label-secondary">'. $category->count . '</span></a></li>';
}
}?>
</ul>
</div>