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.
kspace-wordpress-theme/components/navbar-pages.php

42 lines
1.6 KiB
PHP
Raw Permalink Normal View History

<nav class="container menu toolbar flex-that fg-light d-none d-flex-sm">
<h2 class="sr-only">Menu des pages</h2>
2022-12-08 13:46:17 +01:00
<ul>
<li>
2023-10-13 09:11:42 +02:00
<a href="<?php echo site_url(); ?>" >
2023-11-18 12:17:07 +01:00
<svg class="icon icon-topbar" alt=""><use xlink:href="#icon-home"></use></svg><span class="sr-only">Accueil</span>
2022-12-08 13:46:17 +01:00
</a>
</li>
<?php
$listmenu = get_nav_menu_locations();
$menu = wp_get_nav_menu_items($listmenu['top-navbar']);
foreach ($menu as $menuElement) {
2023-10-13 09:11:42 +02:00
echo '<li><a href="' . $menuElement->url . '" >'. $menuElement->title . '</a></li>';
2022-12-08 13:46:17 +01:00
}
?>
</ul>
<ul class="f-end">
2022-12-08 13:46:17 +01:00
<?php
$listmenu = get_nav_menu_locations();
$menu = wp_get_nav_menu_items($listmenu['top-navbar-2']);
foreach ($menu as $menuElement) {
2023-10-13 09:11:42 +02:00
echo '<li class="d-none d-block-sm"><a href="' . $menuElement->url . '">'. $menuElement->title . '</a></li>';
2022-12-08 13:46:17 +01:00
}
?>
<li>
2023-11-18 12:17:07 +01:00
<a class="menu-item submenu" href="#">Mes sites <svg class="icon icon-caret-down" alt=""><use xlink:href="#icon-caret-down"></use></svg></a>
2023-10-13 09:11:42 +02:00
<ul class="menu fg-dark">
<?php
$listmenu = get_nav_menu_locations();
$menu = wp_get_nav_menu_items($listmenu['link-menu']);
foreach ($menu as $menuElement) {
2023-10-13 09:11:42 +02:00
echo '<li><a href="' . $menuElement->url . '">'. $menuElement->title . '</a></li>';
}
?>
</ul>
</li>
2023-11-18 12:17:07 +01:00
<li><a href="<?php bloginfo('rss2_url'); ?>" ><svg class="icon icon-topbar" alt=""><use xlink:href="#icon-rss"></use></svg><span class="sr-only">Flux RSS du site</span></a></li>
2022-12-08 13:46:17 +01:00
</ul>
</nav>