feat: city guide on city pages (tagline, facts, About, seasons)
Editable per city under Viator tours > Destinations. Shown above the tours on page 1 of an unfiltered listing only; filtering and paging jump to the results. Text recovered from the six old /tour-destination/ pages is imported once into empty guides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -168,6 +168,10 @@ class VC_Display {
|
||||
// Tour page top section + mobile booking bar (after the overrides above).
|
||||
wp_enqueue_style( 'vc-tour', VC_PLUGIN_URL . 'assets/css/vc-tour.css', array( 'vc-design' ), VC_VERSION );
|
||||
}
|
||||
if ( is_tax( 'viator_destination' ) ) {
|
||||
// City guide: tagline, facts bar, About and Seasons (see VC_City_Guide).
|
||||
wp_enqueue_style( 'vc-city', VC_PLUGIN_URL . 'assets/css/vc-city.css', array( 'vc-design' ), VC_VERSION );
|
||||
}
|
||||
|
||||
// Front-end interactions: card rails, FAQ accordion, testimonials
|
||||
// marquee, date field, and auto-submit on quick filter toggles.
|
||||
@@ -329,6 +333,16 @@ class VC_Display {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether any filter in $f (from get_filter_state()) narrows the results.
|
||||
* Sorting alone doesn't count.
|
||||
*/
|
||||
public static function filters_active( array $f ) {
|
||||
return '' !== $f['q'] || ! empty( $f['dest'] ) || ! empty( $f['cat'] ) || ! empty( $f['dur'] )
|
||||
|| $f['pmin'] > 0 || $f['pmax'] < 1000 || $f['rating'] > 0
|
||||
|| $f['freecancel'] || $f['bestdeal'] || $f['sellout'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply the filter state to the main tours query (archive + taxonomy pages).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user