Generate Submenu based on Parent Page using If Statement

Have you assigned the menus to theme locations in wp-admin? If you look under Appearance > Menus, there is a Menu Settings section for each menu, and you should have the correct theme location checked under “display location.”

You might also try simplifying your code. Perhaps for some reason WordPress has not yet identified which page/post/content it is on yet before your code runs. When things go sideways I like to break them down, something like:

<?php
if (is_front_page()) {
    echo 'Front Page';
} elseif ($post->post_parent == 4) {
    echo 'Child of Our Inn';
} elseif ($post->post_parent == 6) {
    echo 'Child of Restaurant';
} elseif ($post->post_parent == 8) {
    echo 'Child of Activities';
} else {
    echo 'WP did not identify what content it was on';
}
?>

Using simple echos instead of going into your real functions, you can determine for sure whether or not your conditions are being met. If the conditions are never met, then for some reason WP does not yet know what content it is pulling up, which may just mean there are multiple loops on the page or something of that nature.

At that point I would move the if/else statement into one of the individual theme files – say page.php – inside that template’s main Loop just to verify, and once that works you can put your wp_nav_menu calls back into place and make sure they are appearing.

You might want to use a query debugging plugin to figure out why WP doesn’t know what content it is showing at the point where you’re trying to add your code. It might be that moving your code below wp_header() if it is not already below it could help.