File: /var/www/html/Siyum_old/wp-content/themes/siyum/footer.php
<footer class="footer">
<div class="footer-inner">
<div class="container custom-container">
<div class="row">
<div class="col-2">
<a class="logo-sec" href="<?php echo esc_url(site_url()); ?>">
<img src="<?php echo get_template_directory_uri(); ?>/img/logo-new.svg" alt="Logo" class="footer-logo">
</a>
</div>
<div class="col-10"></div>
</div>
<div class="row footer-top-sec">
<!-- Left Section -->
<div class="col-md-6">
<!-- <div class="foot-title mb-2">Kedushas Shabbos</div> -->
<!-- <div class="foot-title">
Agudath Israel Of America<br>
42 Broadway, 14th Floor<br>
New York, NY 10004
</div> -->
</div>
<!-- Right Section -->
<div class="col-md-6 text-md-end">
<div class="cont-block">
<a href="tel:1.212.797.9000" class="foot-cont-link foot-title"><span class="icon phn-img"><img src="<?php echo get_template_directory_uri(); ?>/img/f-phone.svg" alt=""></span> <span>(212) 797-9000</span></a>
<a href="mailto:info@thesiyum.org" class="foot-cont-link foot-title"><span class="icon email-img"><img src="<?php echo get_template_directory_uri(); ?>/img/f-inbox.svg" alt=""></span><span>info@thesiyum.org</span></a>
</div>
</div>
</div>
<!-- Links Section -->
</div>
<div class="footer-top-links">
<div class="container custom-container">
<div class="row ">
<div class="col-12 footer-links text-center">
<a href="#" class="footer-link">Home</a>
</div>
</div>
</div>
</div>
</div>
<div class="footer-bottom">
<div class="container custom-container">
<span>© <span id="year">2025</span> THE SIYUM | BUILT BY
<a href="https://kornerstonemedia.com/" target="_blank" class="policy-link strong">
<strong class="fw-bold">KORNERSTONE MEDIA</strong>
</a>
</span>
</div>
</div>
</footer>
<?php
function get_first_video_series_link() {
// Fetch the first post in the 'video_series' post type
$args = array(
'post_type' => 'video_series', // Replace with your custom post type slug
'posts_per_page' => 1, // Get only the first post
'orderby' => 'date', // Order by the date
'order' => 'DESC' // Ascending order
);
$query = new WP_Query($args);
if ($query->have_posts()) {
$query->the_post();
$first_post_url = get_permalink();
wp_reset_postdata(); // Reset the query
return $first_post_url;
}
return '#'; // Default fallback if no posts exist
}
?>
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"></script><!-- js import -->
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script>
<!-- Slick JS -->
<script
src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/parsleyjs"></script>
<!-- scripts -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.3/js/bootstrap.bundle.min.js"
integrity="sha512-7Pi/otdlbbCR+LnW+F7PwFcSDJOuUJB3OxtEHbg4vSMvzvJjde4Po1v4BR9Gdc9aXNUNFVUY+SK51wWT8WF0Gg=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="<?php echo get_template_directory_uri(); ?>/js/header.js"></script>
<script src="<?php echo get_template_directory_uri(); ?>/js/radio_streaming.js"></script>
<script>
document.getElementById("year").textContent = new Date().getFullYear();
$('.publications-slider').slick({
// infinite: true,
slidesToShow: 3,
slidesToScroll: 1,
dots: true,
responsive: [
{
breakpoint: 991,
settings: {
slidesToShow: 2,
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 2,
dots: false,
}
},
{
breakpoint: 500,
settings: {
slidesToShow: 1,
dots: false,
}
}
]
});
<?php if (is_page('home')) { ?>
$('.video-series-slider-lg').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
asNavFor: '.video-series-slider-thumb'
});
$('.video-series-slider-thumb').slick({
slidesToShow: 6,
slidesToScroll: 1,
asNavFor: '.video-series-slider-lg',
dots: false,
butttons: true,
focusOnSelect: true,
responsive: [
{
breakpoint: 1679,
settings: {
slidesToShow: 5
}
},
{
breakpoint: 1400,
settings: {
slidesToShow: 4
}
},
{
breakpoint: 1199,
settings: {
slidesToShow: 3
}
},
{
breakpoint: 991,
settings: {
slidesToShow: 2
}
},
{
breakpoint: 580,
settings: {
slidesToShow: 3,
slidesToScroll: 1
}
},
{
breakpoint: 370,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
},
// You can unslick at a given breakpoint now by adding:
// settings: "unslick"
// instead of a settings object
]
});
<?php } if (!is_page('home')) { ?>
$('.video-series-slider-lg').slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
asNavFor: '.video-series-slider-thumb'
});
$('.video-series-slider-thumb').slick({
slidesToShow: 4,
slidesToScroll: 1,
asNavFor: '.video-series-slider-lg',
dots: false,
arrows: true,
focusOnSelect: true,
autoplay: false,
responsive: [
{
breakpoint: 1199,
settings: {
slidesToShow: 3
}
},
{
breakpoint: 991,
settings: {
slidesToShow: 3,
autoplay: true,
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 2,
autoplay: true,
}
}
]
});
<?php } ?>
//----------------------Inner popup------------------------
$(document).ready(function () {
let sliderInitialized = false;
function initializeSlider() {
if (window.innerWidth < 768) {
if (!sliderInitialized) {
$('.tabSlider').slick({
dots: false,
infinite: true,
arrows:true,
speed: 300,
slidesToShow: 1,
adaptiveHeight: true,
responsive: [
{
breakpoint: 767,
settings: {
slidesToShow: 2,
slidesToScroll: 1
}
},
{
breakpoint: 580,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}]
});
sliderInitialized = true;
}
} else {
if (sliderInitialized) {
$('.tabSlider').slick('unslick'); // Destroy slider
sliderInitialized = false;
}
}
}
// Initialize slider on load and resize
initializeSlider();
$(window).on('resize', function () {
initializeSlider();
});
<?php if (!is_page('home')) { ?>
$('.img-slider').slick({
slidesToShow: 1,
slidesToScroll: 1,
infinite: true,
autoplay: true,
autoplaySpeed: 2000,
arrows: true,
prevArrow: '<button class="slick-prev slick-arrow"><img src="<?php echo get_template_directory_uri(); ?>/img/rt-arrow.svg"></button>',
nextArrow: '<button class="slick-next slick-arrow"><img src="<?php echo get_template_directory_uri(); ?>/img/rt-arrow.svg">Next</button>',
});
<?php } ?>
});
document.addEventListener('DOMContentLoaded', function () {
const modal = document.getElementById('customModal');
const modalTitle = modal.querySelector('.modal-title');
const modalSubtitle = modal.querySelector('.subtitle');
const modalContent = modal.querySelector('.content');
const imgSlider = modal.querySelector('.img-slider');
const downloadButton = modal.querySelector('.btn-primary');
document.querySelectorAll('.lg-play-btn').forEach(button => {
button.addEventListener('click', function () {
// Get data attributes from the clicked button
const title = this.getAttribute('data-title');
const subtitle = this.getAttribute('data-subtitle');
let thumbnail = this.getAttribute('data-thumbnail');
let pdf = this.getAttribute('data-pdf');
let description = this.getAttribute('data-description');
try {
thumbnail = JSON.parse(thumbnail);
pdf = JSON.parse(pdf);
description = JSON.parse(description);
} catch (error) {
console.error("Error parsing JSON data:", error);
}
// Update modal content
modalTitle.textContent = title;
modalSubtitle.textContent = subtitle;
modalContent.textContent = description;
// Clear existing images
imgSlider.innerHTML = '';
// Add new image to the slider
if (thumbnail) {
const imgDiv = document.createElement('div');
imgDiv.classList.add('pdf-image');
imgDiv.innerHTML = `<img src="${thumbnail}" alt="Thumbnail">`;
imgSlider.appendChild(imgDiv);
}
// Update download button
if (pdf) {
downloadButton.innerHTML = `
<span class="ico">
<img src="/wp-content/themes/kedushas/img/pdf.svg" alt="PDF">
</span>
<span><a href="${pdf}" target="_blank">Download PDF</a></span>
`;
downloadButton.setAttribute('href', pdf);
downloadButton.setAttribute('download', `${title || 'document'}.pdf`);
} else {
downloadButton.innerHTML = 'PDF Not Available';
downloadButton.removeAttribute('href');
downloadButton.removeAttribute('download');
}
});
});
});
$('.tab-btn').on('shown.bs.tab', function (e) {
$('.video-series-slider-lg').slick('setPosition');
$('.video-series-slider-thumb').slick('setPosition');
});
<?php if (!is_page('home')) { ?>
$('.tabSlider').slick({
slidesToShow: 5,
slidesToScroll: 1,
dots: false,
arrows: true,
autoplay:false,
infinite: false,
responsive: [
{
breakpoint: 1400,
settings: {
slidesToShow: 4
}
},
{
breakpoint: 1199,
settings: {
slidesToShow: 3
}
},
{
breakpoint: 991,
settings: {
slidesToShow: 2
}
},
{
breakpoint: 767,
settings: {
slidesToShow: 1,
variableWidth: true
}
},
{
breakpoint: 580,
settings: {
slidesToShow: 1,
variableWidth: false,
}
}
]
});
<?php } ?>
function copyToClipboard(text) {
navigator.clipboard.writeText(text).then(function() {
showPopupMessage('Link copied to clipboard');
}, function(err) {
console.error('Could not copy text: ', err);
});
}
function showPopupMessage(message) {
const popupMessageElement = document.getElementById('popup-message');
const popupContentElement = popupMessageElement.querySelector('.popup-content');
popupContentElement.textContent = message;
popupMessageElement.style.display = 'flex';
setTimeout(function() {
popupMessageElement.style.display = 'none';
}, 3000); // Hide after 5 seconds
}
document.querySelectorAll('input[inputmode="numeric"]').forEach(function(el) {
el.addEventListener('input', function() {
this.value = this.value.replace(/\D/g, '');
});
});
// Format input to MM/YY (auto-add slash, allow only digits & '/')
// Auto-format MM/YY input and allow only digits and '/'
function formatExpiry(input) {
let value = input.value.replace(/[^\d]/g, ''); // Remove non-digits
if (value.length >= 3) {
value = value.slice(0, 2) + '/' + value.slice(2, 4);
}
input.value = value.slice(0, 5); // Limit to MM/YY
}
// Custom Parsley validator: Expiry must not be in the past
window.Parsley.addValidator('expiryNotpast', {
validateString: function (value) {
const match = value.match(/^(0[1-9]|1[0-2])\/(\d{2})$/);
if (!match) return false;
const enteredMonth = parseInt(match[1], 10);
const enteredYear = parseInt('20' + match[2], 10);
const today = new Date();
const currentMonth = today.getMonth() + 1; // Jan is 0
const currentYear = today.getFullYear();
// Expired if year is in the past
if (enteredYear < currentYear) {
return false;
}
// Expired if year is current but month is past
if (enteredYear === currentYear && enteredMonth < currentMonth) {
return false;
}
return true; // Valid future expiry
},
messages: {
en: 'Expiry date must not be in the past'
}
});
document.addEventListener('DOMContentLoaded', function () {
const tabPanes = document.querySelectorAll('.tab-pane');
// Initially hide all panes except the first
tabPanes.forEach((pane, index) => {
if (index !== 0) {
pane.classList.remove('active', 'show');
} else {
pane.classList.add('active', 'show');
}
});
// On tab switch, show only the target pane and scroll to its heading
document.querySelectorAll('[data-bs-toggle="tab"]').forEach(tab => {
tab.addEventListener('shown.bs.tab', function () {
const targetId = this.getAttribute('data-bs-target');
const target = document.querySelector(targetId);
// Hide all tab panes
tabPanes.forEach(pane => {
pane.classList.remove('active', 'show');
});
// Show selected pane
if (target) {
target.classList.add('active', 'show');
// Determine the heading to scroll to
const heading = target.querySelector('h2.title');
if (heading) {
// Introduce a slight delay to ensure rendering
setTimeout(() => {
heading.scrollIntoView({ behavior: 'smooth', block: 'center' });
}, 100);
}
}
});
});
});
// document.querySelectorAll('[data-bs-toggle="tab"]').forEach(tab => {
// tab.addEventListener('shown.bs.tab', function (event) {
// const targetId = this.getAttribute('data-bs-target');
// const target = document.querySelector(targetId);
// if (target) {
// target.scrollIntoView({ behavior: 'smooth' });
// }
// });
// });
document.getElementById("register-tab").addEventListener("click", function () {
const targetSelector = this.getAttribute("data-target");
const targetElement = document.querySelector(targetSelector);
const headerOffset = 100; // Adjust based on your fixed header height
if (targetElement) {
const elementPosition = targetElement.getBoundingClientRect().top + window.pageYOffset;
const offsetPosition = elementPosition - headerOffset;
window.scrollTo({
top: offsetPosition,
behavior: "smooth"
});
}
});
document.getElementById("scroll-tab").addEventListener("click", function () {
const targetSelector = this.getAttribute("data-target");
const targetElement = document.querySelector(targetSelector);
const headerOffset = 100; // Adjust based on your fixed header height
if (targetElement) {
const elementPosition = targetElement.getBoundingClientRect().top + window.pageYOffset;
const offsetPosition = elementPosition - headerOffset;
window.scrollTo({
top: offsetPosition,
behavior: "smooth"
});
}
});
document.addEventListener('DOMContentLoaded', function () {
const conditionalFields = document.querySelectorAll('.conditional-field');
const shiurNameInput = document.querySelector('input[name="shiurName"]');
const maggidShiurInput = document.querySelector('input[name="maggidShiur"]');
const radios = document.querySelectorAll('input[name="learningMethod"]');
function toggleConditionalFields(show) {
conditionalFields.forEach(field => {
field.style.display = show ? 'block' : 'none';
});
if (show) {
shiurNameInput.setAttribute('required', 'required');
shiurNameInput.setAttribute('data-parsley-required-message', 'Shiur name is required.');
maggidShiurInput.setAttribute('required', 'required');
maggidShiurInput.setAttribute('data-parsley-required-message', 'Maggid shiur is required.');
} else {
shiurNameInput.removeAttribute('required');
maggidShiurInput.removeAttribute('required');
}
}
toggleConditionalFields(false); // hide by default
radios.forEach(radio => {
radio.addEventListener('change', function () {
if (this.value === 'shiur' || this.value === 'virtual') {
toggleConditionalFields(true);
} else {
toggleConditionalFields(false);
}
});
});
});
// window.addEventListener('load', function() {
// if (window.innerWidth <= 768) {
// document.querySelectorAll('input[placeholder], textarea[placeholder]').forEach(function(el) {
// el.removeAttribute('placeholder');
// });
// }
// });
</script>
<style>
.scroll-down-btn1 {
cursor: pointer;
}
@media (max-width: 767px) {
input::placeholder {
color: transparent !important;
}
}
.popup-message {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
z-index: 1000;
}
.popup-content {
padding: 20px;
background-color: white; /* White background */
border-radius: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
font-size: 16px;
text-align: center;
}
/* Style Parsley validation error messages */
.parsley-errors-list {
color: red !important; /* Make error messages red */
font-size: 14px; /* Adjust font size */
margin-top: 5px; /* Add some space */
list-style: none; /* Remove bullet points */
padding-left: 0; /* Remove padding */
}
/* Highlight input fields with errors */
input.parsley-error,
textarea.parsley-error {
border: 2px solid red !important; /* Add a red border */
background-color: #ffe6e6; /* Light red background */
}
select.parsley-error,
textarea.parsley-error {
border: 2px solid red !important; /* Add a red border */
background-color: #ffe6e6; /* Light red background */
}
input.form-control.parsley-error {
margin-bottom: 0px;
}
select.form-select.custom-select-arrow.parsley-error {
margin-bottom: 0px;
}
select.form-select.parsley-error {
margin-bottom: 0px;
}
#next-section {
scroll-margin-top: 100px; /* Adjust to match your header height */
}
</style>
<?php wp_footer(); ?>
</body>
</html>