I'd like to shorten this code and instead of manually placing all children Id's, I'd like to pull out only the id's and set it to array. this could be something dynamic in the future when they are adding new child page from the parent page.
if ( in_array($post->ID, ['39','41','43','45']) ) {
$menuPage = 'about';
} elseif ( in_array($post->ID, ['47','49','51','53','55','57']) ) {
$menuPage = 'asset';
}
get_template_part( _menu, $menuPage );
I tried some codes but it technically display the title only. Where I am currently using similar to this code.
<ul class="uk-nav uk-navbar-dropdown-nav uk-list uk-list-inline">
<?php
$args = array(
'depth' => 1,
'include' => 15,
'title_li' => '',
);
wp_list_pages($args);
$args['child_of'] = $args['include'];
unset($args['include']);
wp_list_pages($args);
?>
</ul>