components/navbar-pages: Add pages listing

Fix #5
This commit is contained in:
Kazhnuz 2018-10-24 15:19:21 +02:00
parent 93a7a1765b
commit 79d986aee9

View file

@ -8,12 +8,14 @@
<div class="collapse navbar-collapse" id="navbarSupportedContent"> <div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto"> <ul class="navbar-nav mr-auto">
<li class="nav-item"> <?php $pages = get_pages();
<a class="nav-link" href="#">À propos</a> if ( $pages ) {
</li> foreach( $pages as $page ) {
<li class="nav-item"> echo '<li class="nav-item">';
<a class="nav-link" href="#">Contact</a> echo '<a class="nav-link" href="' . get_page_link( $page->ID ) . '">'. $page->post_title .'</a>';
</li> echo '</li>';
}
}?>
</ul> </ul>
</div> </div>
</div> </div>