File "archive-astrip-tour-2.php"

Full Path: /home/peaktdwu/aaronacebhutan.com/wp-content/themes/astrip/archive-astrip-tour-2.php
File size: 2.36 KB
MIME-type: text/x-php
Charset: utf-8

<?php

/**
 * The main template file
 *
 * Template Name: Package Grid 2
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package astrip
 * @since 1.3.0
 * 
 */

get_header();

if( !is_front_page() ) {
    get_template_part('template-parts/breadcrumbs/breadcrumb-tour-archive');
}

?>
    <div class="tour-package-section pt-120 pb-120">
        <div class="container">
            <div class="row g-4">
                <?php
                    global $wp_query;
                    $args = array(
                        'post_type' => 'astrip-tour',
                        'paged' => ( get_query_var('paged') ) ? get_query_var('paged') : 1
                    );
                    $wp_query = new WP_Query($args);
                    ?>
                    <?php if( $wp_query->have_posts() ) :  ?>
                        <?php 
                        while ($wp_query->have_posts()) {
                            $wp_query->the_post();

                            get_template_part('loop-templates/content', 'archive-tour-2');

                        }
                    ?>
                <?php else : ?>
                    <div class="package-not-found">
                        <img src="<?php echo esc_url( EGNS_ASSETS. '/images/icons/package-not-found.svg' )  ?>" alt="<?php echo esc_attr__('Package not found','astrip') ?>">
                        <h3 class="text-center "><?php echo esc_html__('Tour Package not Found','astrip') ?></h3>
                        <p><?php echo esc_html__('It seems we can’t find what you’re looking for.','astrip') ?></p>
                        <a href="<?php echo esc_url(get_post_type_archive_link('astrip-tour')) ?>" class="eg-btn btn--primary btn--lg mt-5"><?php echo esc_html__('Back to Tour','astrip') ?></a>
                    </div>
                <?php endif ?>
            </div>
            <div class="row justify-content-center">
                <div class="col-md-8">
                    <?php get_template_part( 'template-parts/blog/pagination' ); ?>
                </div>
            </div>
        </div>
        <?php wp_reset_postdata() ?>
    </div>

<?php

$theme_options = get_option('egns_theme_options'); // prefix of theme

if ( $theme_options['astrip_insta_feed_switcher'] == true ) :
    // Instagram Feed 
    get_template_part( 'template-parts/common/instagram' );

endif;

get_footer();