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:
@@ -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>';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user