Skip to content

Block Visibility - If the custom field is empty, then don't display the block.  #372

@ashleyshaw

Description

@ashleyshaw

Description

In the Tour Operator plugin, we need to ensure that custom field blocks for the single post types (Accommodation, Tours, and Destinations) are only displayed if the respective field is not empty. If a field is empty, the entire group/block should be hidden on the frontend using CSS classes.

For Tours:

  • price
  • duration
  • travel-style
  • destination-to-tour
  • departs-from
  • ends-in
  • gallery
  • itinerary
  • single-supplement
  • group-size
  • best-time-to-visit
  • booking-validity-start
  • included
  • not-included

For Accommodation:

  • price
  • rating
  • number-of-rooms
  • check-in-time
  • check-out-time
  • minimum-child-age
  • destination-to-accommodation
  • spoken-languages
  • travel-style
  • accommodation-type
  • suggested-visitor-types
  • special-interests
  • gallery
  • rooms
  • included
  • not-included
  • facilities
  • single-supplement

For Destinations:

  • travel-style
  • best-time-to-visit
  • electricity
  • banking
  • cuisine
  • climate
  • transport
  • dress
  • health
  • safety
  • visa
  • general
  • gallery

If any of the above fields are empty for a single post type, the corresponding block should not be displayed on the frontend.

Bugherd Links

Metadata

Metadata

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions