Can I use the Page Hierarchy as the menu?

In the past I’ve used themes that had an option where I could either use the Manual Menu under Appearance | Menus or I could set it so that it would use the Page list to generate the menu based on how I have pages arranged.

Is there any way to do this with this theme? Currently I have to arrange my pages and then have to go manually edit the menu to match if I want to keep things the same.

Thanks.

Hi @kelemvor,

I hope you are well today and thank you for your question.

Currently there isn’t the theme option to achieve this but i have marked it as feature request so that it will be considered to be developed in the future version of theme.

Currently you can try achieving this by adding the following code in the functions.php file of your child theme but you have to manually style the generated pages menu.

if ( ! function_exists( 'activello_header_menu' ) ) :
/**
 * Header menu (should you choose to use one)
 */
function activello_header_menu() {
    if( has_nav_menu('primary')){
        
     // display the WordPress Custom Menu if available
  wp_nav_menu(array(
    'menu'              => 'primary',
    'theme_location'    => 'primary',
    'depth'             => 2,
    'container'         => 'div',
    'container_class'   => 'collapse navbar-collapse navbar-ex1-collapse',
    'menu_class'        => 'nav navbar-nav',
    'fallback_cb'       => 'wp_bootstrap_navwalker::fallback',
    'walker'            => new wp_bootstrap_navwalker()
  ));
  
    }else{
        echo '<ul id="menu-all-pages" class="nav navbar-nav">';
        wp_list_pages(array(
            'depth' => 2, //number of tiers, 0 for unlimited
            'exclude' => '', //comma seperated IDs of pages you want to exclude
            'title_li' => '', //must override it to empty string so that it does not break our nav
            'sort_column' => 'post_title', //see documentation for other possibilites
            'sort_order' => 'ASC', //ASCending or DESCending
        ));
        echo '</ul>';
    }
} /* end header menu */
endif;

Thanks,
Movin