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

18 lines
503 B
PHP
Raw Permalink Normal View History

2023-11-20 10:05:50 +01:00
<nav class="container menu toolbar bg fg-dark categories d-none d-flex-sm">
<h2 class="sr-only">Liste des catégories</h2>
2022-12-18 10:42:34 +01:00
<ul class="f-around">
<?php
$categories = get_categories( array(
'orderby' => 'name',
'order' => 'ASC'
) );
2022-12-17 19:46:29 +01:00
2022-12-18 10:42:34 +01:00
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>
2022-12-17 19:46:29 +01:00
</nav>