diff --git a/includes/classes/blocks/class-templates.php b/includes/classes/blocks/class-templates.php index e14e42dc..558aa454 100644 --- a/includes/classes/blocks/class-templates.php +++ b/includes/classes/blocks/class-templates.php @@ -38,6 +38,7 @@ public function register_post_type_templates() { * The slugs of the built in post types we are using. */ $post_types = [ + // accommodation 'accommodation' => [ 'single' => [ 'title' => __( 'Single Accommodations', 'tour-operator' ), @@ -49,7 +50,27 @@ public function register_post_type_templates() { ], ], //'destination', + 'destination' => [ + 'single' => [ + 'title' => __( 'Single Destination', 'tour-operator' ), + 'description' => __( 'Displays a single destination', 'tour-operator' ), + ], + 'archive' => [ + 'title' => __( 'Destination Archive', 'tour-operator' ), + 'description' => __( 'Displays all the destinations.', 'tour-operator' ), + ], + ], //'tour', + 'tour' => [ + 'single' => [ + 'title' => __( 'Single Tour', 'tour-operator' ), + 'description' => __( 'Displays a single tour', 'tour-operator' ), + ], + 'archive' => [ + 'title' => __( 'Accommodation Archive', 'tour-operator' ), + 'description' => __( 'Displays all the tours.', 'tour-operator' ), + ], + ], ]; foreach ( $post_types as $key => $labels ) { @@ -67,6 +88,50 @@ public function register_post_type_templates() { 'post_types' => [ $key ] ] ); } + + register_block_template( 'lsx-tour-operator//search-results', [ + 'title' => __( 'Search Results', 'tour-operator' ), + 'description' => __( 'Displays when a visitor performs a search on your website.', 'tour-operator' ), + 'content' => $this->get_template_content( 'search-results.html' ), + ] ); + + register_block_template( 'lsx-tour-operator//index', [ + 'title' => __( 'Index', 'tour-operator' ), + 'description' => __( 'Used as a fallback template for all pages when a more specific template is not defined.', 'tour-operator' ), + 'content' => $this->get_template_content( 'index.html' ), + ] ); + + register_block_template( 'lsx-tour-operator//no-title', [ + 'title' => __( 'No Title', 'tour-operator' ), + 'description' => __( 'A generic page template with no page title displayed', 'tour-operator' ), + 'content' => $this->get_template_content( 'no-title.html' ), + ] ); + + register_block_template( 'lsx-tour-operator//pages', [ + 'title' => __( 'Pages', 'tour-operator' ), + 'description' => __( 'A generic page template with a page title displayed', 'tour-operator' ), + 'content' => $this->get_template_content( 'no-title.html' ), + ] ); + + register_block_template( 'lsx-tour-operator//single-region', [ + 'title' => __( 'Single Region', 'tour-operator' ), + 'description' => __( 'Used to display a region of a country in the Destination post-type', 'tour-operator' ), + 'content' => $this->get_template_content( 'single-region.html' ), + 'post_types' => [ 'destination' ] + ] ); + + register_block_template( 'lsx-tour-operator//single-country', [ + 'title' => __( 'Single Region', 'tour-operator' ), + 'description' => __( 'Used to display a country in the Destination post-type', 'tour-operator' ), + 'content' => $this->get_template_content( 'single-country.html' ), + 'post_types' => [ 'destination' ] + ] ); + + register_block_template( 'lsx-tour-operator//archive', [ + 'title' => __( 'All Archives', 'tour-operator' ), + 'description' => __( 'Displays any archive, including posts by a single author, category, tag, taxonomy, custom post type, and date. This template will serve as a fallback when more specific templates (e.g., Category or Tag) cannot be found.', 'tour-operator' ), + 'content' => $this->get_template_content( 'archive.html' ), + ] ); } /** diff --git a/templates/archive-accommodation.html b/templates/archive-accommodation.html index 4b0948bb..0154ac30 100644 --- a/templates/archive-accommodation.html +++ b/templates/archive-accommodation.html @@ -1 +1,117 @@ - \ No newline at end of file + +
+ + + +Discover a wide variety of accommodation options designed to suit every traveller’s needs and preferences. Whether you're seeking the indulgence of a five-star resort, the charm of a boutique hotel, or the simplicity of a rustic cabin, our collection has something for everyone. Each accommodation is carefully chosen to provide comfort, convenience, and a seamless blend with the local surroundings, ensuring that your stay is as memorable as the destinations themselves.
+From:
+Type:
+Rooms:
+Unfortunately, there is no accommodation listed at the moment. Please check back soon as we regularly update our offerings.
+ + + + +Discover our diverse collection of destinations, each offering a unique escape. Browse through stunning locales, from exotic retreats to bustling metropolises, and find the perfect spot for your next adventure. With options to suit every traveller, our destinations archive is your gateway to endless possibilities.
+Unfortunately, there are no destinations listed at the moment. Please check back soon as we regularly update our offerings.
+ + + + +Browse through our extensive collection of tours and find the perfect journey for your next adventure. Whether you're drawn to historical explorations, nature-filled escapes, or vibrant cultural experiences, our range of tours has something to suit every interest. Start planning your next memorable trip with options tailored to every type of traveller.
+From:
+Duration:
+Days
+Unfortunately, there are no tours listed at the moment. Please check back soon as we regularly update our offerings.
+ + + + +Sorry, there are no results matching your search at the moment. Check back later for new updates and exciting options.
+ + + + +Embark on a journey with our blog
+Welcome to our blog, your gateway to the world of travel, exploration, and adventure. Here, we share captivating stories, expert travel tips, and inspiring experiences from our journeys. Whether you're seeking insights for your next trip or simply wish to explore new destinations from afar, our articles are designed to inform, inspire, and ignite your wanderlust. Dive into our latest posts below, and let your adventure begin.
+—
+ + + +by
+ + + + +Unfortunately, there are no blog posts listed at the moment. Please check back soon as we regularly update our offerings.
+ + + + +Category:
+Oops! It looks like we couldn't find any matches for your search. But don't worry, there's plenty more to explore! Try adjusting your search terms.
+ +Rating:
+(
+ + + + + + + +)
+Location:
+Spoken Languages:
+Travel Styles:
+Accommodation Type:
+Number of units:
++
Friendly:
+Unit Type:
+Price:
+From
+ + + + +From
+ + + + +Price Includes:
+ + + + +Price Excludes:
+ + + + +From:
+Type:
+Rooms:
+Regions:
+Regions
+Travel Styles:
+Best Months to Visit
+Best Months to Visit
+Slider
+ + + +Slider
+ + + +General
+Electricity
+Banking
+Cuisine
+Climate
+Transport
+Dress
+Health
+Safety
+Visa
+From:
+Duration:
+Days
+Country
+Country
+Travel Styles
+Best Months to Visit
+Best Months to Visit
+From:
+Duration:
+Days
+From:
+Type:
+Rooms:
+Country
+Country
+Travel Styles
+Best Months to Visit
+Best Months to Visit
+From:
+Duration:
+Days
+From:
+Type:
+Rooms:
+More description content after Read More is clicked
+From:
+Duration:
+Days
+Destinations:
+Travel Styles:
+Departs From:
+Ends In:
+Best Months to Visit
+Best Months to Visit
+Wetu Map goes here
+ + + +Itinerary Description
+Location:
+Location
+Accommodation:
+Accommodation
+Type:
+Accommodation Type
+Drinks Basis:
+Drinks Basis
+Room Basis:
+Room Basis
+From
+ + + + +Price Includes:
+ + + + +Price Excludes:
+ + + + +From:
+Duration:
+Days
+