HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/wpcurated/wp-content/themes/curated/page-blog.php
<?php /* Template Name: Blog Page */ 
get_header();
?>
<section class="sub-bnr service-dtl">
        <div class="container custom-container">
            <div class="content-area">
                <div class="title">Our <span>Blog</span></div>
                <div class="sub-para">Discover helpful tips, resources, and updates on mental health. Whether you're looking for guidance or learning about new approaches, our blog is here to support your wellness journey.</div>
            </div>
            <!-- <div class="bnr-img">
                <img src="<?php echo get_template_directory_uri(); ?>/img/service-detail-bnr-img.png" alt="">
            </div> -->
        </div>
        <div class="bnt-txt-btm">
            <img src="<?php echo get_template_directory_uri(); ?>/img/service-detail-bnr-txt.png" alt="">
        </div>
    </section>
    <section class="our-blog-wrp">
        <div class="container custom-container">
            <div class="blog-access-top">
            <div class="input-group search-blog">
                <input type="text" class="form-control" name="s" placeholder="Search Now" aria-label="Search Now" aria-describedby="searchBlog">
                <button class="btn" type="button" id="searchBlog">
                    <img src="<?php echo get_template_directory_uri(); ?>/img/search-icon.svg" alt="">
                </button>
            </div>
                <div class="tab-control-wrp">
                    <ul class="nav nav-tabs" id="ourBlog" role="tablist">
                        <li class="nav-item" role="presentation">
                            <button class="nav-link active" id="all-tab" data-bs-toggle="tab"
                                data-bs-target="#all-tab-pane" type="button" role="tab" aria-controls="all-tab-pane"
                                aria-selected="true">All</button>
                        </li>
                        <li class="nav-item" role="presentation">
                            <button class="nav-link" id="popular-tab" data-bs-toggle="tab"
                                data-bs-target="#popular-tab-pane" type="button" role="tab"
                                aria-controls="popular-tab-pane" aria-selected="false">Popular Blogs</button>
                        </li>
                        <li class="nav-item" role="presentation">
                            <button class="nav-link" id="latest-tab" data-bs-toggle="tab"
                                data-bs-target="#latest-tab-pane" type="button" role="tab"
                                aria-controls="latest-tab-pane" aria-selected="false">Latest Blogs</button>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="tab-content" id="ourBlogContent">
                <div class="tab-pane fade show active" id="all-tab-pane" role="tabpanel" aria-labelledby="all-tab"
                    tabindex="0">
                    <div class="row blog-listing-blks">
                    <?php
                   $query = new WP_Query(array(
                    'post_type' => 'blog',
                    'posts_per_page' => 10,
                    'tax_query' => array(
                        array(
                            'taxonomy' => 'blog_category', // Match the taxonomy slug you registered
                            'field'    => 'slug',          // Use 'slug' to query by category slug
                            'terms'    => array('blog', 'popular-blog'), // Pass terms as an array
                            'operator' => 'IN', // Optional: ensures that posts match any of the provided terms
                        ),
                    ),
                ));

                    if ($query->have_posts()) : 
                    while ($query->have_posts()) : $query->the_post(); ?>
                        <div class="col-lg-4 col-md-6 col-sm-12">
                            <div class="list-blk-outer">
                                <div class="blog-thumb">
                                    <!-- <img src="<?php echo get_template_directory_uri(); ?>/img/blog1.png" alt=""> -->
                                    <?php the_post_thumbnail('large'); ?>
                                </div>
                                <div class="blog-content">
                                    <div class="sub-title"><?php the_title(); ?></div>
                                    <span class="date"><?php the_date(); ?></span>
                                    <div class="sub-para">
                                    <?php the_excerpt(); ?>
                                    </div>
                                    <a href="<?php echo esc_url(get_permalink()); ?>" class="read-more">Read More</a>
                                </div>
                            </div>
                        </div>
                        <?php endwhile;  wp_reset_postdata();  else : ?>
                        <p>No blog posts found.</p>
                    <?php endif; ?>
                        
                    </div>
                </div>
                <div class="tab-pane fade" id="popular-tab-pane" role="tabpanel" aria-labelledby="popular-tab"
                    tabindex="0">
                    <div class="row blog-listing-blks">
                    <?php
                    $query = new WP_Query(array(
                        'post_type' => 'blog',
                        'posts_per_page' => 10,
                        'tax_query' => array(
                            array(
                                'taxonomy' => 'blog_category', // Match the taxonomy slug you registered
                                'field'    => 'slug',         // Use 'slug' to query by category slug
                                'terms'    => 'popular-blog',   // Replace with your actual category slug
                            ),
                        ),
                    ));

                    if ($query->have_posts()) : 
                    while ($query->have_posts()) : $query->the_post(); ?>
                        <div class="col-lg-4 col-md-6 col-sm-12">
                            <div class="list-blk-outer">
                                <div class="blog-thumb">
                                    <!-- <img src="<?php echo get_template_directory_uri(); ?>/img/blog1.png" alt=""> -->
                                    <?php the_post_thumbnail('large'); ?>
                                </div>
                                <div class="blog-content">
                                    <div class="sub-title"><?php the_title(); ?></div>
                                    <span class="date"><?php the_date(); ?></span>
                                    <div class="sub-para">
                                    <?php the_excerpt(); ?>
                                    </div>
                                    <a href="<?php echo esc_url($blog_url ? $blog_url : get_permalink()); ?>" class="read-more">Read More</a>
                                </div>
                            </div>
                        </div>
                        <?php endwhile;  wp_reset_postdata();  else : ?>
                        <p>No blog posts found.</p>
                    <?php endif; ?>
                       


                    </div>
                </div>
                <div class="tab-pane fade" id="latest-tab-pane" role="tabpanel" aria-labelledby="latest-tab"
                    tabindex="0">
                    <div class="row blog-listing-blks">
                    <?php
                    $query = new WP_Query(array(
                        'post_type' => 'blog',
                        'posts_per_page' => 10,
                        'tax_query' => array(
                            array(
                                'taxonomy' => 'blog_category', // Match the taxonomy slug you registered
                                'field'    => 'slug',         // Use 'slug' to query by category slug
                                'terms'    => 'blog',         // Replace with your actual category slug
                            ),
                        ),
                        'date_query' => array(
                            array(
                                'after' => 'last monday', // Posts after the most recent Monday (start of the week)
                                'before' => 'next sunday', // Posts before the next Sunday (end of the week)
                                'inclusive' => true, // Include posts from the range
                            ),
                        ),
                    ));
                    
                    

                    if ($query->have_posts()) : 
                    while ($query->have_posts()) : $query->the_post(); ?>
                        <div class="col-lg-4 col-md-6 col-sm-12">
                            <div class="list-blk-outer">
                                <div class="blog-thumb">
                                    <!-- <img src="<?php echo get_template_directory_uri(); ?>/img/blog1.png" alt=""> -->
                                    <?php the_post_thumbnail('large'); ?>
                                </div>
                                <div class="blog-content">
                                    <div class="sub-title"><?php the_title(); ?></div>
                                    <span class="date"><?php the_date(); ?></span>
                                    <div class="sub-para">
                                    <?php the_excerpt(); ?>
                                    </div>
                                    <a href="<?php echo esc_url($blog_url ? $blog_url : get_permalink()); ?>" class="read-more">Read More</a>
                                </div>
                            </div>
                        </div>
                        <?php endwhile;  wp_reset_postdata();  else : ?>
                        <p>No blog posts found.</p>
                    <?php endif; ?>
                       
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="blog-media-sec">
            <div class="container custom-container">
                <div class="sec-title-block text-center">
                    <h2>In Media Blogs</h2>
                </div>
            </div>
            <div class="container custom-container left-margin">
                <div class="blog-media-slider">
                    <div class="media-slider">
                    <?php
                   $query = new WP_Query(array(
                    'post_type' => 'blog',
                    'posts_per_page' => 10,
                    'tax_query' => array(
                        array(
                            'taxonomy' => 'blog_category', // Match the taxonomy slug you registered
                            'field'    => 'slug',         // Use 'slug' to query by category slug
                            'terms'    => 'media-blog',   // Replace with your actual category slug
                        ),
                    ),
                ));

                    if ($query->have_posts()) : 
                    while ($query->have_posts()) : $query->the_post();
                    $blog_url = get_post_meta(get_the_ID(), '_blog_url', true); ?>
                        <div class="item">
                            <div class="media-slider-card">
                                <div class="sub-title"><?php the_title(); ?></div>
                                <span class="date"><?php the_date(); ?></span>
                                <div class="sub-para">
                                <?php the_excerpt(); ?>
                                </div>
                                <a href="<?php echo esc_url($blog_url ? $blog_url : get_permalink()); ?>" target="_blank" class="read-more">Read More</a>
                            </div>
                        </div>
                        <?php endwhile;  wp_reset_postdata();  else : ?>
                        <p>No blog posts found.</p>
                    <?php endif; ?>
                        
                    </div>
                    <!-- <div class="review-arrows-block">
                        <button class="review-arrows review-arrow-lft">
                            <img src="<?php echo get_template_directory_uri(); ?>/img/rw-lft.svg" alt="">
                        </button>
                        <button class="review-arrows review-arrow-rgt">
                            <img src="<?php echo get_template_directory_uri(); ?>/img/rw-rgt.svg" alt="">
                        </button>
                    </div> -->
                </div>
            </div>
    </section>

    <section class="start-journey-sec">
        <div class="container custom-container">
            <div class="det-block">
                <h5>Start Your Journey</h5>
                <h2>Begin Your Path to Wellness</h2>
                <p>Let us help you connect with one of our providers who meets your needs and is available to see you
                    online or in person.</p>
                <div class="book-block">
                    <a href="/contact-us" class="book-link">
                        Book A Psychiatric Intake Evaluation
                        <img src="<?php echo get_template_directory_uri(); ?>/img/book-link.svg" alt="">
                    </a>
                </div>
                <a class="cont-cover" href="tel:9174517018">
                    <div class="cont-block">
                        Call Us : (917) 451 - 7018 <img src="<?php echo get_template_directory_uri(); ?>/img/phone-fill.svg" alt="">
                    </div>
                </a>
                </div>
            </div>
        </div>
    </section>

    <section class="logo-slider-sec">
        <div class="logo-slider">
            <div class="logo-slide">
                <div class="inner">
                    <img src="<?php echo get_template_directory_uri(); ?>/img/logo-1.svg" alt="">
                </div>
            </div>
            <div class="logo-slide">
                <div class="inner">
                    <img src="<?php echo get_template_directory_uri(); ?>/img/logo-2.svg" alt="">
                </div>
            </div>
            <div class="logo-slide">
                <div class="inner">
                    <img src="<?php echo get_template_directory_uri(); ?>/img/logo-3.svg" alt="">
                </div>
            </div>
            <div class="logo-slide">
                <div class="inner">
                    <img src="<?php echo get_template_directory_uri(); ?>/img/logo-4.svg" alt="">
                </div>
            </div>
        </div>
    </section>
    <?php get_footer(); ?>