feat: tour page photos-first layout, mobile booking bar; board 1 fixes
Tour page (boards 2 and 3):
- Replace the blurred 'Welcome to {city}' hero with a breadcrumb and a photo
gallery (1 large + 2, 'All N photos' opens the lightbox); the H1 title,
rating with review count and facts follow; booking card stays sticky
- Phones/tablets: swipeable photos, name before price, 2x2 facts, and a
fixed bottom bar with price + Check availability (vc-tour.css)
Board 1:
- Hide Viator internal tags ('Agent Low Quality Product'...) from the tour
category, listing filter and activities section (VC_Tags, tested)
- Listings: run the query filter late and set posts_per_archive_page so
pages show 12 tours as the count says
- Footer columns without a menu show default links (quick links, structure
cities, contact/about/faq) instead of empty headings
Plugin 1.9.5, theme 1.0.13.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,8 +12,51 @@ $hoho_about = apply_filters(
|
||||
|
||||
$hoho_socials = hoho_socials();
|
||||
|
||||
$hoho_footer_col = function ( $location ) {
|
||||
/**
|
||||
* Default links for a footer column that has no menu assigned, so the footer
|
||||
* is never three empty headings. Pages are linked only if they exist.
|
||||
*/
|
||||
$hoho_footer_defaults = function ( $location ) {
|
||||
$page = function ( $slugs, $label ) {
|
||||
foreach ( (array) $slugs as $slug ) {
|
||||
$p = get_page_by_path( $slug );
|
||||
if ( $p && 'publish' === $p->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 '<ul>';
|
||||
foreach ( $links as $link ) {
|
||||
echo '<li><a href="' . esc_url( $link[1] ) . '">' . esc_html( $link[0] ) . '</a></li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
};
|
||||
|
||||
$hoho_footer_col = function ( $location ) use ( $hoho_footer_defaults ) {
|
||||
if ( ! has_nav_menu( $location ) ) {
|
||||
$hoho_footer_defaults( $location );
|
||||
return;
|
||||
}
|
||||
wp_nav_menu(
|
||||
|
||||
Reference in New Issue
Block a user