feat: add page listing to the navbar

This commit is contained in:
Kazhnuz Klappsthul 2021-01-03 09:10:54 +01:00
parent 01cd47dd5e
commit 7037021187
1 changed files with 10 additions and 1 deletions

View File

@ -9,7 +9,16 @@
if ($category->slug == "blog") {
echo '<a class="btn btn-navbar" href="' . get_category_link($category->term_id) . '">' . $category->name . '</a>';
}
}?>
}
$pages = get_pages();
if ( $pages ) {
foreach( $pages as $page ) {
if ($page->post_name != "home") {
echo '<a class="btn btn-navbar" href="'. get_page_link( $page->ID ) . '">'. $page->post_title .'</a>';
}
}
}?>
<!-- <a href="/blog.html" class="btn btn-navbar">Blog</a> -->
<!-- <a href="/crea.html" class="btn btn-navbar">Romans</a> -->
<!-- <a href="/apropos.html" class="btn btn-navbar">A propos</a> -->