HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ubuntu-s-2vcpu-4gb-amd-sfo3-01 6.8.0-71-generic #71-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 16:52:38 UTC 2025 x86_64
User: root (0)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /var/www/mentalhealthsteps.com/wp-content/themes/mentalhealthworld/home.php
<?php
/*
** Template Name: Home
*/ 
get_header(); ?>
<!-- hero-section area start here  -->


  <main>

<section class="hnt-ticker-sec">
    <div class="hnt-ticker-wrap">

        <button class="hnt-ticker-arrow hnt-prev" type="button">&#8592;</button>

        <div class="hnt-ticker-viewport">
            <div class="hnt-ticker-track">

                <div class="hnt-ticker-card">
                    <img src="<?php echo get_template_directory_uri(); ?>/image/Building Resilience After Trauma.jpg" alt="">
                    <p>Today: You need to get out there and socialize...</p>
                </div>

                <div class="hnt-ticker-card">
                    <img src="<?php echo get_template_directory_uri(); ?>/image/begenire-guide.jpg" alt="">
                    <p>Events Near You: The Aquabats!</p>
                </div>

                <div class="hnt-ticker-card">
                    <img src="<?php echo get_template_directory_uri(); ?>/image/Boost Your Mood.jpg" alt="">
                    <p>AI Chat: What habit could improve my week?</p>
                </div>

                <div class="hnt-ticker-card">
                    <img src="<?php echo get_template_directory_uri(); ?>/image/Depressive Disorders.jpg" alt="">
                    <p>What to Watch: Happy Gilmore 2</p>
                </div>

                <div class="hnt-ticker-card">
                    <img src="<?php echo get_template_directory_uri(); ?>/image/Building Resilience After Trauma.jpg" alt="">
                    <p>Today in History: 'Animal House' hits theaters</p>
                </div>

                <div class="hnt-ticker-card">
                    <img src="<?php echo get_template_directory_uri(); ?>/image/Building Resilience After Trauma.jpg" alt="">
                    <p>Play Creators: 275K plays</p>
                </div>

            </div>
        </div>

        <button class="hnt-ticker-arrow hnt-next" type="button">&#8594;</button>

    </div>
</section>
    <!-- Hero Section -->
    <section class="section hero-section d-flex align-items-center pb-0" style="background: linear-gradient(to right, rgba(0,0,0,.8), rgba(0,0,0,.5)), url('<?php echo get_field('banner_image'); ?>');">

      <div class="b-container px-3 px-sm-4 px-md-0">
        <div class="row row-cols-1 row-cols-lg-2 g-4  text-white">
          <!-- Left Content -->
          <div class="col mt-md-5 text-center text-lg-start d-flex flex-column align-items-center align-items-lg-start">
            <h6 class="text-white fw-semibold"> <?php echo get_field('banner_heading'); ?></h6>
            <h1 class="display-md-4 lh-sm font-1 text-white" style="font-weight: 900;">
              <?php echo get_field('banner_sub_heading'); ?>
            </h1>
            <hr class="border border-white border-2 opacity-75 w-75 my-4 mx-auto mx-lg-0">
            <!-- <p class="fs-7 my-4 text-white">
              Discover evidence‐based articles, expert research, and practical tools designed specifically for older
              adults and their caregivers. From anxiety to medication guides, MentalHealthHaven.com is your go-to source
              for compassionate, reliable senior mental wellness information.
            </p> -->
            <div
              class="d-flex gap-3 align-items-center my-4 flex-nowrap justify-content-lg-start justify-content-center">
              <a href="<?php echo get_field('slider_button_link'); ?>" role="button" class="btn btn-quotes-1"><?php echo get_field('slider_button'); ?></a>


            </div>
          </div>

          <!-- Right Image -->
          <div class="col position-relative text-center pt-lg-4 pt-xl-3">
           

            <div class="bnr-right-area">
              <h3 class="text-white"><?php echo get_field('health_topics_heading'); ?></h3>
              <?php
$health_topics = new WP_Query(array(
    'post_type'      => 'health-topics',
    'post_status'    => 'publish',
    'posts_per_page' => 12,
    'orderby'        => 'title',
    'order'          => 'ASC',
));

if ($health_topics->have_posts()) :
    $count = 0;

    while ($health_topics->have_posts()) : $health_topics->the_post();

        if ($count % 2 == 0) {
            echo '<div class="banner-right-area-link-div">';
            echo '<div class="row g-2">';
        }
        ?>

        <div class="col-6">
            <a href="<?php the_permalink(); ?>">
                <?php the_title(); ?>
            </a>
        </div>

        <?php
        $count++;

        if ($count % 2 == 0) {
            echo '</div>';
            echo '</div>';
        }

    endwhile;

    if ($count % 2 != 0) {
        echo '<div class="col-6"></div>';
        echo '</div>';
        echo '</div>';
    }

    wp_reset_postdata();
endif;
?>
            </div>
            

            <!-- Badge Review -->
            <!-- <div
              class="badge-cta position-absolute top-50 start-0 translate-middle-y bg-secondary-color py-3 px-4 rounded-5 text-white text-center d-none d-md-block"
              style="z-index: 3;">
              <h3 class="mb-0 font-1 fw-bolder">4.9 /5</h3>
              <p class="mb-0">Review on Google</p>
            </div> -->
            <!-- Badge Phone -->
            <!-- <div
              class="badge-cta py-3 px-4 rounded-5 d-flex align-items-center gap-3 justify-content-start"
              style=" z-index: 1;">
              <div class="bnr-circle "
                style="width: 60px; height: 60px;">
                <i class="fa-solid fa-phone"></i>
              </div>
              <div class="justify-content-start">
                <p class="mb-0">Call us anytime</p>
                <h3 class="font-1 fw-bolder">+1 000 000 0000</h3>
              </div>
            </div> -->


          </div>
        </div>
      </div>
    </section>
    <!-- #hero end -->


<div class="swiper myVideoSlider">
        <div class="swiper-wrapper">
      
             <?php if( have_rows('videos') ): ?>
    <?php while( have_rows('videos') ): the_row(); ?>
        <?php 
        $video_image = get_sub_field('video_image'); // ACF image field
        $video_link  = get_sub_field('video_link');  // ACF video URL
        $video_text = get_sub_field('video_text');  // ACF video URL
        ?>
        <div class="swiper-slide video-car">
                <a data-fancybox="video-gallery" data-src="<?php echo esc_url($video_link); ?>">
                    <?php if( $video_image ): ?>
                        <img src="<?php echo esc_url($video_image['url']); ?>" alt="<?php echo esc_attr($video_image['alt']); ?>" />
                    <?php else: ?>
                        <img src="<?php echo get_template_directory_uri(); ?>/images/fallback.jpg" alt="Fallback Image" />
                    <?php endif; ?>
                    <i class="fa-solid fa-circle-play"></i>
                </a>
                <h4><?php echo esc_html( $video_text ); ?></h4>
        </div>
    <?php endwhile; ?>
<?php else: ?>
    <p>No videos found.</p>
<?php endif; ?>

      
        </div>
      
        <!-- Navigation arrows -->
        <div class="swiper-button-prev"></div>
        <div class="swiper-button-next"></div>
      
      </div>




    <!-- slider area start -->



    <!-- slider area end -->

    <script>
      let slider = document.querySelector('.slider');
let sliderItems = document.querySelectorAll('.slider-item');
let totalItems = sliderItems.length;
let index = 0;

function updateSliderPosition() {
  const slideWidth = sliderItems[0].offsetWidth + 20; // Item width + gap
  slider.style.transform = `translateX(-${index * slideWidth}px)`;
}

function moveSlider() {
  if (index >= totalItems) {
    index = 0;  // Reset to first item if at the end
  }
  updateSliderPosition();
}

// Move slider on arrow click
document.getElementById('left-arrow').addEventListener('click', () => {
  index--;
  if (index < 0) {
    index = totalItems - 1; // Loop to the last item
  }
  updateSliderPosition();
});

document.getElementById('right-arrow').addEventListener('click', () => {
  index++;
  if (index >= totalItems) {
    index = 0;  // Reset to first item if at the end
  }
  updateSliderPosition();
});

// Auto slide every 2 seconds
setInterval(moveSlider, 2000);
    </script>



    <!-- About Section -->
    <section class=" section pb-5 my-5">
      <div class="b-container">
        <div
          class="row row-cols-1 row-cols-xl-2 g-5 align-items-center justify-content-center text-center text-xl-start">
          <!-- Left Content Side -->
          <div class="col-lg-6 position-relative d-flex justify-content-center">
            <div class=" about-img-div">
              <!-- Primary Image -->
              <div class="ratio-wrapper-429">
                <img src="<?php echo get_field('about_img_1'); ?>" alt="About Us" class="about-big-img">
              </div>
              <!-- Experience Label -->
              <!-- <div
                class="position-absolute bottom-0 end-0 bg-secondary-color text-white px-4 py-2 rounded-4 m-3 fw-bold small z-1 text-center">
                <span class="font-1 fs-2 fw-bold">10+ Years</span><br>
                <span class="fs-5">Of Experience</span>
              </div> -->
              <!-- Circle Image -->
              <div class="position-absolute" style="top:0px; right: 0; z-index: 3;">
                <div class="img-circle rounded-circle overflow-hidden border border-4 border-white shadow">
                  <img src="<?php echo get_field('about_img_2'); ?>" alt="About Us Detail" class="w-100 h-100">
                </div>
              </div>
            </div>
          </div>
          <!-- Right Content Side -->
          <div class="col about-left-div">
            <h6 class="text-primary-color fw-semibold mb-2"><?php echo get_field('about_heading'); ?></h6>
            <h2 class="font-1 mb-4" style="font-weight: 800;"><?php echo get_field('about_sub_heading'); ?></h2>
            <p class="text-secondary" style="font-size: large;">
              <?php echo get_field('about_desc'); ?>
            </p>
            <a href="<?php echo get_field('about_button_link'); ?>" class="btn btn-quotes-1"><?php echo get_field('about_button'); ?></a>

          </div>
        </div>
      </div>
    </section>
    <!-- #about end -->


    <!-- research section start -->
    
    <section class="health-topic-carousel-section">
    <div class="container">
        <div class="research-top-content">
          <h6 class="text-primary-color fw-semibold mb-2 text-center text-uppercase"><?php echo get_field('topics_heading'); ?></h6>
          <h2 class="font-1 mb-4 text-center" style="font-weight: 800;"><?php echo get_field('topics_sub_heading'); ?></h2>
        </div>

        <div class="health-topic-slider owl-carousel">
            <?php
            $health_topics = new WP_Query(array(
                'post_type'      => 'health-topics',
                'post_status'    => 'publish',
                'posts_per_page' => -1,
                'orderby'        => 'date',
                'order'          => 'DESC',
            ));

            if ($health_topics->have_posts()) :
                while ($health_topics->have_posts()) : $health_topics->the_post();

                    $image = has_post_thumbnail()
                        ? get_the_post_thumbnail_url(get_the_ID(), 'large')
                        : get_template_directory_uri() . '/assets/images/no-image.jpg';
                    ?>

                    <div class="health-topic-slide-item">
                        <a href="<?php the_permalink(); ?>" class="health-topic-card">
                            <div class="health-topic-img">
                                <img src="<?php echo esc_url($image); ?>" alt="<?php the_title_attribute(); ?>">
                            </div>

                            <div class="health-topic-content">
                                <h3><?php the_title(); ?></h3>
                                <span>Read More</span>
                            </div>
                        </a>
                    </div>

                <?php
                endwhile;
                wp_reset_postdata();
            endif;
            ?>
        </div>
    </div>
</section>


    

    <!-- Consult Section -->
    <section class="section py-5 text-white bg-gradient-secondary my-5">
      <div class="b-container">
        <div class="row justify-content-center align-items-center text-center text-xl-start my-5">
          <div class="col-12 col-xl-5">
            <h6 class="text-primary-color fw-semibold mb-2 text-uppercase">NEWS & EVENTS</h6>
            <h2 class="font-1 mb-4 text-black" style="font-weight: 800;">
              Updates by Topic

            </h2>
          </div>
          <div class="col-12 col-xl-7 mt-4 mt-md-0">
            <p class="mb-4 text-dark" style="font-size: large;">The National Institutes of Health has funded six projects to develop, test, and validate outcome-focused quality measures for mental health,  which are used to understand the impact of interventions when implemented in real-world health care systems and settings.</p>
            <a href="<?php echo esc_url( home_url('/news-events/') ); ?>" class="btn btn-quotes-1">Read more</a>
          </div>
        </div>

        <hr class="border-white solid border-2 my-5">

        <div class="row text-white mb-0 mb-xl-5 pt-5">
          <div class="step-box col-12 col-lg-4">
            <h1>01</h1>
            <h3>Bipolar Disorder</h3>
            <p>Largest-ever genome-wide study of a diverse group of people with bipolar disorder sheds new light on the genetic architecture underlying the disorder.</p>
          </div>
          <div class="step-box col-12 col-lg-4">
            <h1>02</h1>
            <h3>Depression</h3>
            <p>An NIMH-funded study showed that incorporating depression treatment into care for chronic health conditions improved well-being for both patients and their families.</p>
          </div>
          <div class="step-box col-12 col-lg-4">
            <h1>03</h1>
            <h3>Eating Disorders</h3>
            <p>Hospital visits for urgent mental health care increased among children and teens in the second year of the COVID-19 pandemic, according to an NIMH-supported study.</p>
          </div>
        </div>
      </div>
    </section>
    <!-- #consult end -->



    <!-- news&funding Section -->
    <!-- <section class="section py-5">
      <div class="b-container">
        <div class="news-top-content">
          <h6 class="text-primary-color fw-semibold mb-2 text-center text-uppercase">NEWS & EVENTS</h6>
          <h2 class="font-1 mb-4 text-center" style="font-weight: 800;">Ongoing Research Initiatives</h2>
        </div>
        <div class="row row-cols-1 row-cols-md-2 row-cols-lg-4 g-4 justify-content-center mt-4">
 
          <div class="col">
            <div class="bg-secondary-color text-white p-4 rounded-5 h-100 transition-hover">
              <div class="d-flex align-items-center gap-3 mb-3 justify-content-start">
                <div class="d-flex align-items-center justify-content-center bg-secondary-color-1 rounded-circle"
                  style="width: 50px; height: 50px;">
                  <img src="image/news-1.png" style="width: 50px; height: 50px;" alt="">
                </div>
                <h6 class="fw-bold mb-2" style="font-size: large;">Annual Senior Health Research Symposium</h6>
              </div>
              <p class="mt-3">An in-person gathering featuring expert-led presentations on breakthroughs in aging and
                cognition.</p>
            </div>
          </div>


          <div class="col">
            <div class="bg-secondary-color-2 text-white p-4 rounded-5 h-100 transition-hover">
              <div class="d-flex align-items-center gap-3 mb-3 justify-content-start">
                <div class="d-flex align-items-center justify-content-center  rounded-circle"
                  style="width: 50px; height: 50px;">
                  <img src="image/news-2.png" style="width: 50px; height: 50px;" alt="">
                </div>
                <h6 class="fw-bold mb-2" style="font-size: large;">Virtual Webinar Series</h6>
              </div>
              <p class="mt-3">Monthly online sessions covering topics like fall prevention techniques, managing chronic
                conditions.</p>
            </div>
          </div>


          <div class="col">
            <div class="bg-primary-color text-white p-4 rounded-5 h-100 transition-hover">
              <div class="d-flex align-items-center gap-3 mb-3 justify-content-start">
                <div class="d-flex align-items-center justify-content-center  rounded-circle"
                  style="width: 50px; height: 50px;">
                  <img src="image/news-3.png" style="width: 50px; height: 50px;" alt="">
                </div>
                <h6 class="fw-bold mb-2" style="font-size: large;">Local Community Workshops</h6>
              </div>
              <p class="mt-3">Hands-on events hosted in partnership with senior centers, focusing on nutrition.</p>
            </div>
          </div>


          <div class="col">
            <div class="bg-primary-color-2 text-white p-4 rounded-5 h-100 transition-hover">
              <div class="d-flex align-items-center gap-3 mb-3 justify-content-start">
                <div class="d-flex align-items-center justify-content-center rounded-circle"
                  style="width: 50px; height: 50px;">
                  <img src="image/news-4.png" style="width: 50px; height: 50px;" alt="">
                </div>
                <h6 class="fw-bold mb-2" style="font-size: large;">Roundtable Discussions</h6>
              </div>
              <p class="mt-3">Quarterly virtual forums where healthcare professionals and advocates debate emerging
                trends.</p>
            </div>
          </div>

        </div>
      </div>
    </section> -->
    <!-- #features end -->





    <!-- Services Section -->
    <section class="section py-5">
      <div class="b-container text-center">
        <h6 class="text-primary-color fw-semibold mb-2 text-uppercase">Resource</h6>
        <h2 class="display-5 font-1 mb-5" style="font-weight: 800;">Featured Resources</h2>
        <div class="swiper mySwiper mt-4">
          <div class="swiper-wrapper">
            <!-- Card 1 -->
            <div class="swiper-slide">

              <div class="card border-0 rounded-5 overflow-hidden shadow-sm">
                <img src="<?php echo bloginfo('template_directory'); ?>/image/medication-1.jpg" class="w-100"
                  style="height: 250px; transform: scale(1.5); object-position: center;" alt="Individual Therapy">
                <div class="bg-accent-color-2 text-start p-4 position-relative h-100">
                  <div class="icon-div position-absolute top-0 start-0 translate-middle-y"
                    style="margin-top: 0; margin-left: 20px;">
                    <img src="<?php echo bloginfo('template_directory'); ?>/image/icon/icon-1.png" alt="" width="100">
                  </div>

                  <h3 class="font-1 mt-4" style="font-weight: 700; font-size: 26px;">Brochures and Fact Sheets</h3>
                  <p class="mb-3">El NIMH ofrece panfletos y hojas de datos sobre trastornos de la salud mental...</p>
                  <a href="" class="btn-quotes-1">Read More</a>
                </div>
              </div>
            </div>

            <!-- Card 2 -->
            <div class="swiper-slide">

              <div class="card border-0 rounded-5 overflow-hidden shadow-sm">
                <img src="<?php echo bloginfo('template_directory'); ?>/image/medication-2.jpg" class="w-100"
                  style="height: 250px; transform: scale(1.5); object-position: center;" alt="Individual Therapy">
                <div class="bg-accent-color-2 text-start p-4 position-relative h-100">
                  <div class="icon-div position-absolute top-0 start-0 translate-middle-y"
                    style="margin-top: 0; margin-left: 20px;">
                    <img src="<?php echo bloginfo('template_directory'); ?>/image/icon/icon-2.png" alt="" width="100">
                  </div>

                  <h3 class="font-1 mt-4" style="font-weight: 700; font-size: 26px;">RDoC</h3>
                  <p class="mb-3">Learn more about Research Domain Criteria Initiative (RDoC)... </p>
                  <a href="" class="btn-quotes-1">Read More</a>
                </div>
              </div>
            </div>

            <!-- Card 3 -->
            <div class="swiper-slide">

              <div class="card border-0 rounded-5 overflow-hidden shadow-sm">
                <img src="<?php echo bloginfo('template_directory'); ?>/image/medication-3.jpg" class="w-100"
                  style="height: 250px; transform: scale(1.5); object-position: center;" alt="Individual Therapy">
                <div class="bg-accent-color-2 text-start p-4 position-relative h-100">
                  <div class="icon-div position-absolute top-0 start-0 translate-middle-y"
                    style="margin-top: 0; margin-left: 20px;">
                    <img src="<?php echo bloginfo('template_directory'); ?>/image/icon/icon-3.png" alt="" width="100">
                  </div>

                  <h3 class="font-1 mt-4" style="font-weight: 700; font-size: 26px;">Research</h3>
                  <p class="mb-3">Learn more about our research areas, policies, resources, and initiatives...</p>
                  <a href="" class="btn-quotes-1">Read More</a>
                </div>
              </div>
            </div>

            <!-- Card 4 -->
            <div class="swiper-slide">

              <div class="card border-0 rounded-5 overflow-hidden shadow-sm">
                <img src="<?php echo bloginfo('template_directory'); ?>/image/medication-4.jpg" class="w-100"
                  style="height: 250px; transform: scale(1.5); object-position: center;" alt="Individual Therapy">
                <div class="bg-accent-color-2 text-start p-4 position-relative h-100">
                  <div class="icon-div position-absolute top-0 start-0 translate-middle-y"
                    style="margin-top: 0; margin-left: 20px;">
                    <img src="<?php echo bloginfo('template_directory'); ?>/image/icon/icon-4.png" alt="" width="100">
                  </div>

                  <h3 class="font-1 mt-4" style="font-weight: 700; font-size: 26px;">Social Media</h3>
                  <p class="mb-3">Connect with Us on X, Facebook, YouTube, Instagram, and LinkedIn...</p>
                  <a href="" class="btn-quotes-1">Read More</a>
                </div>
              </div>
            </div>

            <!-- Card 5 -->
            <div class="swiper-slide">

              <div class="card border-0 rounded-5 overflow-hidden shadow-sm">
                <img src="<?php echo bloginfo('template_directory'); ?>/image/medication-5.jpg" class="w-100"
                  style="height: 250px; transform: scale(1.5); object-position: center;" alt="Individual Therapy">
                <div class="bg-accent-color-2 text-start p-4 position-relative h-100">
                  <div class="icon-div position-absolute top-0 start-0 translate-middle-y"
                    style="margin-top: 0; margin-left: 20px;">
                    <img src="<?php echo bloginfo('template_directory'); ?>/image/icon/icon-5.png" alt="" width="100">
                  </div>

                  <h3 class="font-1 mt-4" style="font-weight: 700; font-size: 26px;">Investigators</h3>
                  <p class="mb-3">Learn more about scientists, physicians, and clinicians in NIMH’s Division of ...</p>
                  <a href="" class="btn-quotes-1">Read More</a>
                </div>
              </div>
            </div>

            <!-- Card 6 -->
            <div class="swiper-slide">

              <div class="card border-0 rounded-5 overflow-hidden shadow-sm">
                <img src="<?php echo bloginfo('template_directory'); ?>/image/medication-5.jpg" class="w-100"
                  style="height: 250px; transform: scale(1.5); object-position: center;" alt="Individual Therapy">
                <div class="bg-accent-color-2 text-start p-4 position-relative h-100">
                  <div class="icon-div position-absolute top-0 start-0 translate-middle-y"
                    style="margin-top: 0; margin-left: 20px;">
                    <img src="<?php echo bloginfo('template_directory'); ?>/image/icon/icon-6.png" alt="" width="100">
                  </div>

                  <h3 class="font-1 mt-4" style="font-weight: 700; font-size: 26px;">Support for Clinical Trials</h3>
                  <p class="mb-3">Learn more about clinical trials and funding opportunity announcements...</p>
                  <a href="" class="btn-quotes-1">Read More</a>
                </div>
              </div>
            </div>

          </div>
        </div>
      </div>

    </section>
    <!-- #services end -->

    


  </main>
  <!-- #main end -->
<?php get_footer();?>