File: /var/www/html/Siyum_old/wp-content/themes/kedushas/page-publications.php
<?php /* Template Name: Publications Page */
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
// Query the publications posts
$args = array(
'post_type' => 'publications', // 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()) :
// Loop through the posts
while ($query->have_posts()) : $query->the_post();
?>
<button class="nav-link tab-btn <?php echo ($query->current_post == 0) ? '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">
<div class="tab-pane fade show active" id="v-pills-home" role="tabpanel"
aria-labelledby="v-pills-home-tab">
<div class="tab-data-content">
<div class="data-title">
<h2>How Can We Tell What Our Olam Haba Will Look Like?</h2>
<h6>HaRav Pinches Friedman</h6>
<p>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...</p>
</div>
<div class="video-slider-cover">
<div class="video-series-slider-lg">
<?php
// Query the publications posts
$args = array(
'post_type' => 'publications', // 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()) :
// Loop through the posts
while ($query->have_posts()) : $query->the_post();
?>
<div class="item-lg">
<div class="item-lg-cover">
<button class="lg-play-btn">
<img src="<?php echo get_template_directory_uri(); ?>/img/play-btn.svg" alt="">
</button>
<img class="media-lg" src="<?php echo get_template_directory_uri(); ?>/img/about-img.png" alt="">
</div>
</div>
</div>
<div class="video-series-slider-thumb">
<div class="thumb-item">
<div class="thumb-cover">
<img class="thumb-media-item" src="<?php echo get_template_directory_uri(); ?>/img/about-img.png" alt="">
</div>
</div>
<div class="thumb-item">
<div class="thumb-cover">
<img class="thumb-media-item" src="<?php echo get_template_directory_uri(); ?>/img/about-img.png" alt="">
</div>
</div>
</div>
</div>
<?php
endwhile;
wp_reset_postdata();
else :
echo '<p>No publications found.</p>';
endif;
?>
</div>
</div>
</div>
</div>
</div>
</div>
</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
// Query the publications posts
$args = array(
'post_type' => 'publications', // 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()) :
// Loop through the posts
while ($query->have_posts()) : $query->the_post();
?>
<button class="nav-link tab-btn <?php echo ($query->current_post == 0) ? '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
$query = new WP_Query($args);
if ($query->have_posts()) :
while ($query->have_posts()) : $query->the_post();
$volumes = get_post_meta(get_the_ID(), 'publications_volumes', 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
?>
<div class="tab-pane fade <?php echo ($query->current_post == 0) ? 'show 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($volumes)) {
foreach ($volumes as $volume) {
?>
<div class="item-lg">
<div class="item-lg-cover">
<button class="lg-play-btn" data-bs-toggle="modal"
data-bs-target="#customModal" data-title="<?php echo esc_attr($volume['title']); ?>"
data-subtitle="<?php echo esc_attr($volume['subtitle']); ?>"
data-thumbnail="<?php echo esc_attr(json_encode($volume['thumbnail'])); ?>"
data-pdf="<?php echo esc_attr(json_encode($volume['pdf'])); ?>"
data-description="<?php echo esc_attr(json_encode($volume['description'])); ?>"
>
<img src="<?php echo get_template_directory_uri(); ?>/img/download-btn.svg" alt="">
</button>
<img class="media-lg" src="<?php echo esc_url($volume['thumbnail']); ?>" alt="">
</div>
</div>
<?php } } ?>
</div>
<div class="video-series-slider-thumb">
<!-- Thumbnails for the slider -->
<?php
if (!empty($volumes)) {
foreach ($volumes as $volume) {
?>
<div class="thumb-item">
<div class="thumb-cover">
<img class="thumb-media-item" src="<?php echo esc_url($volume['thumbnail']); ?>" alt="">
</div>
<div class="thumb-det">
<h5><?php echo esc_html($volume['title']) ?></h5>
<p><?php echo esc_html($volume['subtitle']) ?></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">
<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>
<input type="email" placeholder="Enter your email" class="form-control">
<button class="send-btn">
<img src="<?php echo get_template_directory_uri(); ?>/img/send.svg" alt="Send">
</button>
</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">
<div class="item">
<div class="publications-card">
<div class="media-block">
<img class="media-item" src="<?php echo get_template_directory_uri(); ?>/img/popup-image.png" alt="">
</div>
<div class="data-content">
<p>Volume 01</p>
<h4>Publication 01</h4>
</div>
</div>
</div>
<div class="item">
<div class="publications-card">
<div class="media-block">
<img class="media-item" src="<?php echo get_template_directory_uri(); ?>/img/popup-image.png" alt="">
</div>
<div class="data-content">
<p>Volume 01</p>
<h4>Publication 01</h4>
</div>
</div>
</div>
<div class="item">
<div class="publications-card">
<div class="media-block">
<img class="media-item" src="<?php echo get_template_directory_uri(); ?>/img/popup-image.png" alt="">
</div>
<div class="data-content">
<p>Volume 01</p>
<h4>Publication 01</h4>
</div>
</div>
</div>
<div class="item">
<div class="publications-card">
<div class="media-block">
<img class="media-item" src="<?php echo get_template_directory_uri(); ?>/img/popup-image.png" alt="">
</div>
<div class="data-content">
<p>Volume 01</p>
<h4>Publication 01</h4>
</div>
</div>
</div>
</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>
<div class="row form-inner">
<div class="col-md-4">
<input type="text" class="form-control" placeholder="Name*" required>
</div>
<div class="col-md-4">
<input type="email" class="form-control" placeholder="Email*" required>
</div>
<div class="col-md-2">
<button type="submit" class="btn btn-submit w-100">Sign up</button>
</div>
</div>
</form>
</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">
<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>
</div>
<p class="content">
</p>
<!-- Description -->
</div>
</div>
</div>
</div>
<?php get_footer(); ?>