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-pages.php
2023-05-03 11:27:05 +02:00

46 lines
1.7 KiB
PHP

<div class="osd">
<div class="container menu toolbar fg-light d-none d-flex-sm">
<nav class="d-flex">
<h2 class="sr-only">Menu des pages</h2>
<ul>
<li>
<a href="<?php echo site_url(); ?>" class="menu-item">
<i class="fa fa-home" aria-hidden="true"></i><span class="sr-only">Accueil</span>
</a>
</li>
<li>
<a href="#" class="menu-item submenu">
Pages <i class="fa fa-caret-down"></i>
</a>
<ul class="bg-light menu fg-dark">
<?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="menu-item">'. $menuElement->title . '</a></li>';
}
?>
</ul>
</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="menu-item">'. $menuElement->title . '</a></li>';
}
?>
</ul>
</nav>
<ul class="f-end d-none d-flex-sm">
<?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="menu-item">'. $menuElement->title . '</a></li>';
}
?>
<li class="f-column f-center"><?php include(TEMPLATEPATH . '/components/searchform.php'); ?></li>
</ul>
</div>
</div>