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

29 lines
1.1 KiB
PHP
Raw Normal View History

<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<div class="container-fluid">
<a class="navbar-brand" href="<?php echo site_url(); ?>" id="" ><img src="<?php echo get_template_directory_uri();?>/img/brand-icon.png" alt="Quarante-Douze"></a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<?php $pages = get_pages();
if ( $pages ) {
foreach( $pages as $page ) {
echo '<li class="nav-item">';
echo '<a class="nav-link" href="' . get_page_link( $page->ID ) . '">'. $page->post_title .'</a>';
echo '</li>';
}
}?>
</ul>
<ul class="navbar-nav my-2 my-lg-0">
<li class="form">
<?php include(TEMPLATEPATH . '/components/searchform.php'); ?>
</li>
</ul>
</div>
</div>
</nav>