feat(menu): list regions and cities in the header menu

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 15:24:15 +03:30
parent f6153376f9
commit c73189f2db
3 changed files with 97 additions and 0 deletions

View File

@@ -54,5 +54,12 @@ function hoho_nav_fallback() {
echo '<ul class="nav__list">';
echo '<li><a class="nav__link" href="' . esc_url( home_url( '/' ) ) . '">' . esc_html__( 'Home', 'hoponhopoff' ) . '</a></li>';
echo '<li><a class="nav__link" href="' . esc_url( $archive ) . '">' . esc_html__( 'Tours', 'hoponhopoff' ) . '</a></li>';
// Regions + cities from the Viator Collector structure, when active.
if ( class_exists( 'VC_Menu' ) ) {
$items = VC_Menu::items();
if ( $items ) {
echo walk_nav_menu_tree( $items, 2, (object) array( 'walker' => new Hoho_Nav_Walker() ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
}
echo '</ul>';
}