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/navbar-category.php
2023-05-02 09:23:01 +02:00

17 lines
509 B
PHP

<nav class="container menu toolbar bg-light fg-dark categories d-none d-flex-sm">
<h2 class="sr-only">Liste des catégories</h2>
<ul class="f-around">
<?php
$categories = get_categories( array(
'orderby' => 'name',
'order' => 'ASC'
) );
foreach( $categories as $category ) {?>
<li>
<a class="menu-item" href="<?php echo get_category_link($category->term_id) ?>"><?php echo $category->name ?></a>
</li>
<?php }
?>
</ul>
</nav>