wp_list_pages, links only for pages with no children
To create the menu in the first place, feel free to use the shortcode [AVIA_tree_menu root=”your_root_document_title”] by adding this to functions.php: function sc_AVIA_tree_menu($atts) { extract(shortcode_atts(array(‘root’ => ‘Start’,), $atts)); //default if empty. $page = get_page_by_title($root); $args = array( ‘child_of’ => $page->ID, ‘date_format’ => get_option(‘date_format’), ‘depth’ => 0, ‘echo’ => 0, ‘post_type’ => ‘page’, ‘post_status’ => ‘publish’, … Read more