improvement: prise en compte de l'ordre des pages

This commit is contained in:
Kazhnuz 2021-01-22 14:24:42 +01:00
parent 98aab9cc7a
commit 473c4da58a

View file

@ -10,7 +10,10 @@
echo '<a class="btn btn-navbar" href="' . get_category_link($category->term_id) . '">' . $category->name . '</a>'; echo '<a class="btn btn-navbar" href="' . get_category_link($category->term_id) . '">' . $category->name . '</a>';
} }
} }
$pages = get_pages(); $pages = get_pages( array(
"sort_column" => 'menu_order',
'sort_order' => 'ASC'
));
if ( $pages ) { if ( $pages ) {
foreach( $pages as $page ) { foreach( $pages as $page ) {
if ($page->post_name != "home") { if ($page->post_name != "home") {