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

17 lines
460 B
PHP
Raw Normal View History

2022-12-18 16:41:18 +01:00
<nav class="container menu toolbar bg-light fg-dark categories d-none d-flex-sm">
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>