post_status ) { return array( $label, get_permalink( $p ) ); } } return null; }; $links = array(); if ( 'hoho_quick' === $location ) { $links[] = array( __( 'Home', 'hoponhopoff' ), home_url( '/' ) ); if ( get_post_type_archive_link( 'viator_tour' ) ) { $links[] = array( __( 'All Tours', 'hoponhopoff' ), get_post_type_archive_link( 'viator_tour' ) ); } $links[] = get_option( 'page_for_posts' ) ? array( __( 'Blog', 'hoponhopoff' ), get_permalink( get_option( 'page_for_posts' ) ) ) : $page( array( 'blogs', 'blog' ), __( 'Blog', 'hoponhopoff' ) ); } elseif ( 'hoho_tours' === $location && class_exists( 'VC_Structure' ) ) { // The first cities from Settings → Viator Structure. foreach ( array_slice( VC_Structure::cities( VC_Structure::get() ), 0, 6 ) as $city ) { $links[] = array( $city['name'], home_url( '/' . $city['slug'] . '/' ) ); } } elseif ( 'hoho_account' === $location ) { $links[] = $page( array( 'contact-us', 'contact' ), __( 'Contact Us', 'hoponhopoff' ) ); $links[] = $page( array( 'about-us', 'about' ), __( 'About Us', 'hoponhopoff' ) ); $links[] = $page( array( 'faq', 'faqs' ), __( 'FAQ', 'hoponhopoff' ) ); } $links = array_filter( $links ); if ( ! $links ) { return; } echo ''; }; $hoho_footer_col = function ( $location ) use ( $hoho_footer_defaults ) { if ( ! has_nav_menu( $location ) ) { $hoho_footer_defaults( $location ); return; } wp_nav_menu( array( 'theme_location' => $location, 'container' => false, 'items_wrap' => '', 'depth' => 1, 'fallback_cb' => false, ) ); }; ?>