47 lines
1.6 KiB
PHP
47 lines
1.6 KiB
PHP
|
<nav class="toolbar flex-that">
|
||
|
<ul>
|
||
|
<li>
|
||
|
<a href="<?php echo site_url(); ?>" class="btn btn-navbar">
|
||
|
<i class="fa fa-home" aria-hidden="true"></i><span class="sr-only">Accueil</span>
|
||
|
</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<span class="btn btn-navbar">
|
||
|
Catégories <i class="fa fa-caret-down" aria-hidden="true"></i>
|
||
|
<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 . '</a></li>';
|
||
|
}
|
||
|
}?>
|
||
|
</ul>
|
||
|
</span>
|
||
|
</li>
|
||
|
<?php
|
||
|
$listmenu = get_nav_menu_locations();
|
||
|
$menu = wp_get_nav_menu_items($listmenu['top-navbar']);
|
||
|
foreach ($menu as $menuElement) {
|
||
|
echo '<li><a href="' . $menuElement->url . '" class="btn btn-navbar">'. $menuElement->title . '</a></li>';
|
||
|
}
|
||
|
?>
|
||
|
</ul>
|
||
|
|
||
|
<ul>
|
||
|
<?php
|
||
|
$listmenu = get_nav_menu_locations();
|
||
|
$menu = wp_get_nav_menu_items($listmenu['top-navbar-2']);
|
||
|
foreach ($menu as $menuElement) {
|
||
|
echo '<li><a href="' . $menuElement->url . '" class="btn btn-navbar">'. $menuElement->title . '</a></li>';
|
||
|
}
|
||
|
?>
|
||
|
<li><a href="<?php bloginfo('rss2_url'); ?>" class="btn btn-navbar"><i class="fa fa-rss" aria-hidden="true"></i><span class="sr-only">Flux RSS du site</span></a></li>
|
||
|
</ul>
|
||
|
</nav>
|
||
|
|