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/Siyum_old/wp-content/themes/kedushas/page-video.php
<?php  
get_header();
?>

      <section class="inner-banner-sec">
		<video class="banner-media" autoplay muted loop>
			<source src="<?php echo get_template_directory_uri(); ?>/video/publication.mp4" type="video/mp4">
			Your browser does not support the video tag.
		</video>
        <div class="overlay"></div>
		<div class="container custom-container">
			<div class="title-block">
				<h2>Your Journey into the Beauty of Shabbos</h2>
				<p>Join us on a transformative journey into the beauty and depth of Shabbos with our special video
					series. Each week, delve into the richness of Shabbos and explore the customs, traditions, and
					significance of the various facets of the holy day. Be guided towards a deeper connection with
					Shabbos Kodesh, igniting your soul and enriching your life.</p>
			</div>
		</div>
	</section>

  <section class="inner-tab-sec">
    <div class="container custom-container-1500">
        <div class="inner-tab-cover">
            <div class="video-tab-cover">
                <div class="video-tab-wrapper">
                    <div class="left-btn-block">
                        <div class="nav tab-btn-block nav-pills " id="v-pills-tab" role="tablist" aria-orientation="vertical">
                            <?php
							$selected_post= get_the_ID();
                           
                            $args = array(
                                'post_type' => 'video_series', // Or the custom post type slug you're using
                                'posts_per_page' => -1, // To display all posts, adjust as needed
                            );
							
                            $query = new WP_Query($args);

                            // Check if there are any posts
                            if ($query->have_posts()) :
								 
								if($selected_post)
								{
									$is_active = ($selected_post) ? 'active' : '';
								}
								else {
								$is_active = ($query->current_post == 0) ? 'active' : '';
								}
                                // Loop through the posts
                                while ($query->have_posts()) : $query->the_post();
								//echo get_the_ID();
								 
								$is_active = ($selected_post==get_the_ID() ) ? 'active' : '';
								 
                                    ?>
                                    <button class="nav-link tab-btn <?php echo $is_active; ?>" 
                                            id="v-pills-<?php echo get_the_ID(); ?>-tab" 
                                            data-bs-toggle="pill" 
                                            data-bs-target="#v-pills-<?php echo get_the_ID(); ?>" 
                                            type="button" 
                                            role="tab" 
                                            aria-controls="v-pills-<?php echo get_the_ID(); ?>" 
                                            aria-selected="true">
                                        <div class="data-label">
                                            <?php the_title(); ?>
                                        </div>
                                    </button>
                                    <?php
                                endwhile;
                                wp_reset_postdata();
                            else :
                                echo '<p>No publications found.</p>';
                            endif;
                            ?>
                        </div>
                    </div>

                    <div class="right-content-block">
                        <div class="tab-content" id="v-pills-tabContent">
							
                            <?php
                            // Query again for post details and content
							//<?php echo ($query->current_post == 0) ? 'show active' : ''; 
							
                            $query = new WP_Query($args);
                            if ($query->have_posts()) :
                                while ($query->have_posts()) : $query->the_post();
                                $video_series = get_post_meta(get_the_ID(), '_video_series', true);  // Adjust the custom field name as per your setup
                                $issue = get_post_meta(get_the_ID(), 'issue', true);    // Adjust the custom field name as per your setup
                                $thumbnail = get_post_meta(get_the_ID(), 'thumbnail', true); // Assuming 'thumbnail' is the custom field for the image
								                $is_active = ($selected_post==get_the_ID() ) ? 'active show' : ''; ?>
                                    <div class="tab-pane fade <?php echo $is_active; ?>" 
                                         id="v-pills-<?php echo get_the_ID(); ?>" 
                                         role="tabpanel" 
                                         aria-labelledby="v-pills-<?php echo get_the_ID(); ?>-tab">
                                        <div class="tab-data-content">
                                            <div class="data-title">
                                                <h2><?php the_title(); ?></h2>
                                                <h6>Published by: <?php the_author(); ?></h6>
                                                <p><?php the_excerpt(); ?></p> <!-- or the_content() to display the full content -->
                                            </div>

                                            <div class="video-slider-cover">
                                                <div class="video-series-slider-lg">
                                                <?php
                                                 
                                                  if (!empty($video_series)) {
                                                   foreach ($video_series as $video) {

                                                     ?>
                                                    <div class="item-lg">
                                                        <div class="item-lg-cover">
                                                            <button class="lg-play-btn" data-bs-toggle="modal"
                                                            data-bs-target="#customModalVideo" data-title="<?php echo esc_attr($video['title']); ?>"
                                                            data-subtitle="<?php echo esc_html($author_name); ?>"
                                                            data-url="<?php echo esc_url($video['url']); ?>"
                                                            data-pdf="<?php echo esc_url($video['pdf']); ?>"
                                                            data-description="<?php echo esc_url($video['description']); ?>"
                                                            data-description="<?php echo esc_attr(json_encode($video['description'])); ?>"
                                                           >
                                                                <img src="<?php echo get_template_directory_uri(); ?>/img/download-btn.svg" alt="">
                                                            </button>
                                                            <img class="media-lg" src="<?php echo esc_url($video['thumbnail']); ?>" alt="">
                                                        </div>
                                                    </div>
                                                    <?php } } ?>
                                                   
                                                </div>

                                                <div class="video-series-slider-thumb">
                                                    <!-- Thumbnails for the slider -->
                                                     <?php
                                                  
                                                     if (!empty($video_series)) {
                                                      foreach ($video_series as $video) {

                                                        ?>
                                                    <div class="thumb-item">
                                                        <div class="thumb-cover">
                                                            <img class="thumb-media-item" src="<?php echo esc_url($video['thumbnail']); ?>" alt="">
                                                      
                                                        </div>
                                                        <div class="thumb-det">
                                                        <h5><?php echo esc_attr($video['title']); ?></h5>
                                                        <p><?php echo esc_html($author_name); ?></p>
                                                      </div>
                                                    </div>
                                                    <?php } } ?>
                                                   
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <?php
                                endwhile;
                                wp_reset_postdata();
                            else :
                                echo '<p>No publications found.</p>';
                            endif;
                            ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>


   
    <section class="enjoy-shabbos">
        <div class="custom-container container">
            <div class="inner-sec">
                <div class="title">Enjoy Shabbos on Shabbos</div>
                <div class="inner-content">Print out Ki Heim Chayeinu and enjoy it on Shabbos, share it with family and elevate<br> Shabbos in your home</div>
                <div class="two-btn">
				<button class="btn whatsap" onclick="location.href='https://chat.whatsapp.com/ABCDE12345FGHIJ67890';">
					<span class="ico">
						<img src="<?php echo get_template_directory_uri(); ?>/img/whatsap.svg" alt="whatsap">
					</span>
					<span>Join WhatsApp Group</span>
				</button>

        <div class="email-input">
					<button class="btn receive-email">
						<span class="ico"><img src="<?php echo get_template_directory_uri(); ?>/img/mail-ico.svg" alt="Email"></span>
						Receive Email
					</button>
					<?php
					$pdf_url = get_field('publication_pdf');
					?>
					<input type="email" placeholder="Enter your email" class="form-control">
					 
					<button class="send-btn" data-pdf-url="<?php echo esc_url($pdf_url['url']); ?>">
						<img src="<?php echo get_template_directory_uri(); ?>/img/send.svg" alt="Send">
					</button>
          
				</div>
        <div id="successAlert" class="alert alert-success" role="alert" style="text-align: center; display: none;"></div>      </div>
            </div>
        </div>
    </section>

    <section class="publications-slider-sec">
      <div class="container custom-container">
        <div class="title-block">
          <h2>Recommended Publications</h2>
          <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries</p>
        </div>
        <div class="publications-slider-cover">
          <div class="publications-slider">
          <?php
          $query = new WP_Query(array(
            'post_type' => 'publications',
            'posts_per_page' => -1,
          ));

          if ($query->have_posts()) :
            while ($query->have_posts()) : $query->the_post();
              $volumes = get_post_meta(get_the_ID(), 'publications_volumes', true);
              if (!empty($volumes)) :
                $first_volume = reset($volumes); // Get the first volume
          ?>
                <div class="item">
                  <div class="publications-card">
                    <div class="media-block">
                      <img class="media-item" src="<?php echo esc_url($first_volume['thumbnail']); ?>" alt="">
                    </div>
                    <div class="data-content">
                      <p><?php echo esc_html($volume['title']) ?></p>
                      <h4><?php the_title(); ?></h4>
                    </div>
                  </div>
                </div>
          <?php
              endif;
            endwhile;
          endif;
          wp_reset_postdata();
          ?>

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

   

    <section class="newsletter-section">
    <div class="container custom-container">
        <div class="subtitle">Subscribe to our Newsletter</div>
        <div class="sub-content"> Sign up for our weekly updates to be the first to receive inspiring content, news, events, and downloads.</div>
        <div class="form-sec">
            <form id="newsletter-form">
                <div class="row form-inner">
                    <div class="col-md-4">
                        <input type="text" id="name" class="form-control" placeholder="Name*" required>
                    </div>
                    <div class="col-md-4">
                        <input type="email" id="email" class="form-control" placeholder="Email*" required>
                    </div>
                    <div class="col-md-2">
                        <button type="submit" class="btn btn-submit btn-subscribe w-100">Subscribe</button>
                    </div>
                </div>
            </form>
            <div id="subAlert" class="alert alert-success" role="alert" style="text-align: center; display: none;"></div>      </div>
          
        </div>
    </div>
</section>


      <!-- Modal -->
 <!-- <div class="modal inner-popup fade" id="customModal" tabindex="-1" aria-hidden="true">
   <div class="modal-dialog modal-dialog-centered modal-lg">
     <div class="modal-content">
       <div class="modal-header">
         
         <button
           type="button"
           class="btn-close"
           data-bs-dismiss="modal"
           aria-label="Close"
         ></button>
       </div>
       <div class="modal-body">
        <div>
            <div class="modal-title"></div>
            <div class="subtitle"></div>
          </div>
         <!-- Slick Slider -->
          <div class="img-slider">
            <div class="pdf-image">
                <img src="<?php echo get_template_directory_uri(); ?>/img/popup-image.png" alt="popup-image">
             </div>
             
            
          </div>
           
    

         <!-- Email Input and Button  
          <div class="input-sec">
         
                <div class="form-inner">
                    <div class="two-btn">
                        <button class="btn btn-primary">
                            <span class="ico"><img src="<?php echo get_template_directory_uri(); ?>/img/pdf.svg" alt="pdf"></span> <span>Download PDF</span>
                           </button>
                           <button class="btn whatsap" onclick="location.href='https://chat.whatsapp.com/ABCDE12345FGHIJ67890';">
								<span class="ico">
									<img src="<?php echo get_template_directory_uri(); ?>/img/whatsap.svg" alt="whatsap">
								</span>
								<span>Join WhatsApp Group</span>
							</button>

                 
                         </div>
                         <!-- <div class="single-btn">
                      <button class="next-btn prev-btn">
                        <span class="ico1"><img src="<?php echo get_template_directory_uri(); ?>/img/back-arw.svg"></span> <span>Back</span> 
                        </button>
                        <button class="next-btn">
                        <span>Next</span> <span class="ico1"><img src="<?php echo get_template_directory_uri(); ?>/img/arrow.png" alt="whatsap"></span>
                        </button>
                     </div>-----
                     
                </div>
       
            </div>
            <p class="content">
            
            </p>
            
         <!-- Description  
        
          </div>
        

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

    <!-- Modal -->
 <!-- Modal -->
 <div class="modal inner-popup fade" id="customModalVideo" tabindex="-1" aria-hidden="true">
   <div class="modal-dialog modal-dialog-centered modal-lg">
     <div class="modal-content">
       <div class="modal-header">
         
         <button
           type="button"
           class="btn-close"
           data-bs-dismiss="modal"
           aria-label="Close"
         ></button>
       </div>
       <div class="modal-body">
        <div>
            <div class="modal-title"></div>
            <div class="subtitle"></div>
          </div>
          
         <!-- Slick Slider -->
         <div class="video-sec" id="videoContainer">
                    <!-- Video will be dynamically loaded here -->
         </div>

         <!-- Email Input and Button -->
          <div class="input-sec">
         
                <div class="form-inner">
                    <div class="two-btn">
                    
                   <button class="btn whatsap">
                    	<span class="ico"><img src="<?php echo get_template_directory_uri(); ?>/img/whatsap.svg" alt="whatsap"></span> <span>Join WhatsApp Group</span>
                   </button>
				   <button class="btn btn-primary">
                        <span class="ico"><img src="<?php echo get_template_directory_uri(); ?>/img/pdf.svg" alt="pdf"></span> <span>Receive via email</span>
                    </button>
                     </div>
                     <div class="single-btn">
                    <button class="next-btn">
                        <span>Next</span> <span class="ico1"><img src="<?php echo get_template_directory_uri(); ?>/img/arrow.png" alt="whatsap"></span>
                        </button>
                     </div>
               
                </div>
       
            </div>
            
         <!-- Description -->
         <p class="content">
            When the Torah questioned Hashem about the ability of the Jewish people to learn Torah
            while earning a livelihood, Hashem reassured them that it would always be learned on
            Shabbos, a day when we disconnect from the world of business and finance. All of this
            world is a corridor to Olam Haba, and Shabbos represents that ultimate goal.</p>
          </div>
        

       </div>
     </div>
   </div>
 </div>
<?php get_footer(); ?>