| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) { |
| 3 |
exit; // Exit if accessed directly. |
| 4 |
} |
| 5 |
|
| 6 |
global $ova_elems_template; |
| 7 |
$ova_elems_template = 'template8'; |
| 8 |
|
| 9 |
$dynamic_settings = [ |
| 10 |
'autoplay' => (!empty($static_settings['autoplay']) && $static_settings['autoplay'] == '1') ? ($static_settings['autoplay_delay'] ?? 1000) : false, // Autoplay delay |
| 11 |
'effect' => $static_settings['effect'] ?? 'fade', |
| 12 |
'crossFade' => !empty($static_settings['fade_crossfade']), |
| 13 |
'lazyLoad' => !empty($static_settings['lazy_load']) && $static_settings['lazy_load'] == '1' ? true : false, |
| 14 |
'autoplay_delay' => isset($static_settings['autoplay_delay']) ? absint($static_settings['autoplay_delay']) : 1000, |
| 15 |
]; |
| 16 |
|
| 17 |
wp_enqueue_style('ova-elems-style8', OVA_ELEMS_URL . 'assets/css/style8.css', array(), OVA_ELEMS_VER); |
| 18 |
wp_enqueue_script('ova-elems-template-8-frontend-scripts', OVA_ELEMS_URL . 'assets/js/template-8-scripts.js', array('jquery'), OVA_ELEMS_VER, true); |
| 19 |
// Localize the script |
| 20 |
wp_localize_script('ova-elems-template-8-frontend-scripts', 'template8SliderConfig', $dynamic_settings); |
| 21 |
?> |
| 22 |
|
| 23 |
|
| 24 |
<!-- Slider Background Image Section --> |
| 25 |
<div class="oe-education-slider-bg-image position-relative" style="background-image: url('<?php echo esc_url(isset($static_settings['bg_slide_image']) ? $static_settings['bg_slide_image'] : ''); ?>'); background-size: cover; background-position: center; background-repeat: no-repeat;"> |
| 26 |
|
| 27 |
<!-- Container Start --> |
| 28 |
<div class="container"> |
| 29 |
|
| 30 |
<!-- Slider Content Outer Box --> |
| 31 |
<div class="oe-education-slider-content-outer-box position-relative"> |
| 32 |
|
| 33 |
<!-- Row Start --> |
| 34 |
<div class="row oe-education-main-row"> |
| 35 |
<!-- Left Content Section --> |
| 36 |
<div |
| 37 |
class="col-xl-5 col-lg-4 col-md-6 col-sm-12 col-12 oe-education-slider-content-inner-box align-self-center"> |
| 38 |
<div class="oe-education-slider-banner-content-box"> |
| 39 |
<div class="d-flex flex-column gap-2 oe-education-slider-banner-content-main"> |
| 40 |
<!-- Sub Heading --> |
| 41 |
<div |
| 42 |
class="d-flex justify-content-md-start justify-content-sm-center justify-content-center align-items-center"> |
| 43 |
<span |
| 44 |
class="oe-education-slider-sub-head statichead-text-font"><?php echo esc_attr($static_settings['mini_title2'][0] ?? ''); ?></span> |
| 45 |
</div> |
| 46 |
|
| 47 |
<!-- Main Heading --> |
| 48 |
<div class="oe-education-slider-banner-heading-box"> |
| 49 |
<h1 id="slide_splice" |
| 50 |
class="slide_splice oe-education-slider-banner-main-head slide-list text-md-start text-sm-center text-center"> |
| 51 |
<?php echo esc_html($static_settings['list_title'] ?? ''); ?> |
| 52 |
</h1> |
| 53 |
</div> |
| 54 |
|
| 55 |
<!-- Description --> |
| 56 |
<p |
| 57 |
class="oe-education-slider-banner-sec-para slide-desc text-md-start text-sm-center text-center"> |
| 58 |
<?php echo esc_html($static_settings['list_description'] ?? 'Lorem Ipsum is simply dummy text of the printing and typesetting industry.'); ?> |
| 59 |
</p> |
| 60 |
|
| 61 |
<!-- Banner Points --> |
| 62 |
<?php |
| 63 |
if (!empty($static_settings['enter_list'])) { |
| 64 |
echo '<div class="row oe-education-slider-banner-points ">'; |
| 65 |
foreach ($static_settings['enter_list'] as $index => $item) { |
| 66 |
if ($index % 2 == 0) { |
| 67 |
echo '<div class="col-lg-6 oe-education-custom">'; |
| 68 |
} else { |
| 69 |
echo '<div class="col-lg-6 oe-education-custom">'; |
| 70 |
} |
| 71 |
echo '<i class="fa fa-check me-3"></i><span class="oe-education-slider-banner-point-text slide-list-content">' . esc_html($item) . '</span>'; |
| 72 |
echo '</div>'; |
| 73 |
} |
| 74 |
echo '</div>'; |
| 75 |
} |
| 76 |
?> |
| 77 |
|
| 78 |
<!-- Buttons --> |
| 79 |
<div |
| 80 |
class="d-flex gap-md-4 gap-sm-2 gap-2 align-items-center oe-education-slider-banner-btn-box pt-3"> |
| 81 |
<a class="oe-education-slider-explore-btn staticbutton-text-font" |
| 82 |
href="<?php echo esc_url($static_settings['static_button_url'] ?? ''); ?>"><?php echo esc_attr($static_settings['static_button_text'] ?? ''); ?></a> |
| 83 |
<a class="oe-education-slider-appointement-btn staticbutton-text-font" |
| 84 |
href="<?php echo esc_url($static_settings['static_button2_url'] ?? ''); ?>"><?php echo esc_attr($static_settings['static_button2_text'] ?? ''); ?></a> |
| 85 |
</div> |
| 86 |
</div> |
| 87 |
</div> |
| 88 |
</div> |
| 89 |
<!-- End Left Content Section --> |
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
<!-- Middle Banner Box --> |
| 94 |
<div class="col-xl-4 col-lg-5 col-md-6 oe-education-slider-banner-box"> |
| 95 |
|
| 96 |
<!-- sliding functionality start --> |
| 97 |
<div class="swiper-container"> |
| 98 |
<div class="swiper-wrapper"> |
| 99 |
<?php foreach ($slides as $index => $slide): ?> |
| 100 |
<?php if (!empty($slide['course_id'])): |
| 101 |
// Same PHP logic as before |
| 102 |
$course_title = get_the_title($slide['course_id']); |
| 103 |
$price_type = get_post_meta($slide['course_id'], '_tutor_course_price_type', true); |
| 104 |
$price = get_post_meta($slide['course_id'], 'tutor_course_price', true); |
| 105 |
$sale_price = get_post_meta($slide['course_id'], 'tutor_course_sale_price', true); |
| 106 |
$course_level = get_post_meta($slide['course_id'], '_tutor_course_level', true); |
| 107 |
$duration_meta = get_post_meta($slide['course_id'], '_course_duration', true); |
| 108 |
$duration = !empty($duration_meta) ? maybe_unserialize($duration_meta) : []; |
| 109 |
$hours = $duration['hours'] ?? '0'; |
| 110 |
$minutes = $duration['minutes'] ?? '0'; |
| 111 |
$thumbnail_id = get_post_meta($slide['course_id'], '_thumbnail_id', true); |
| 112 |
$thumbnail_url = !empty($thumbnail_id) ? wp_get_attachment_url($thumbnail_id) : ''; |
| 113 |
$author_id = get_post_field('post_author', $slide['course_id']); |
| 114 |
$author_name = get_the_author_meta('display_name', $author_id); |
| 115 |
$author_avatar = get_avatar($author_id); |
| 116 |
?> |
| 117 |
<div class="swiper-slide"> |
| 118 |
<div class="oe-education-slider-post-box"> |
| 119 |
<?php if (!empty($thumbnail_url)): ?> |
| 120 |
<img src="<?php echo esc_url($thumbnail_url); ?>" |
| 121 |
alt="<?php echo esc_attr($course_title); ?>"> |
| 122 |
<?php endif; ?> |
| 123 |
<div class="oe-education-slider-post-content-box"> |
| 124 |
<div class="d-flex" style="gap: 1rem"> |
| 125 |
<div> |
| 126 |
<span> |
| 127 |
<?php echo esc_html("{$hours} Hours {$minutes} Minutes"); ?> |
| 128 |
</span> |
| 129 |
</div> |
| 130 |
<div class="ps-4"> |
| 131 |
<span> |
| 132 |
<?php echo esc_html(ucfirst($course_level)); ?> |
| 133 |
</span> |
| 134 |
</div> |
| 135 |
</div> |
| 136 |
<h4 class="oe-education-slider-post-title"> |
| 137 |
<?php echo esc_html($course_title); ?> |
| 138 |
</h4> |
| 139 |
<div class="oe-education-slider-post-author-box d-flex" |
| 140 |
style="justify-content:space-between;"> |
| 141 |
<div class="oe-education-admin"> |
| 142 |
<span class="author-avatar-box"> |
| 143 |
<?php echo esc_html($author_name); ?> |
| 144 |
<?php if ($author_avatar): ?> |
| 145 |
<div class="author-avatar"><?php echo wp_kses_post($author_avatar); ?></div> |
| 146 |
<?php endif; ?> |
| 147 |
</span> |
| 148 |
</div> |
| 149 |
|
| 150 |
<div class="oe-education-slider-post-price"><?php echo esc_html($price); ?> |
| 151 |
<?php if (!empty($sale_price)): ?> (Sale: |
| 152 |
<?php echo esc_html($sale_price); ?>)<?php endif; ?></div> |
| 153 |
</div> |
| 154 |
</div> |
| 155 |
</div> |
| 156 |
</div> |
| 157 |
<?php endif; ?> |
| 158 |
<?php endforeach; ?> |
| 159 |
|
| 160 |
</div> |
| 161 |
<!-- Navigation --> |
| 162 |
|
| 163 |
|
| 164 |
<div class="swiper-pegination-buttons"> |
| 165 |
<div class="swiper-button"> |
| 166 |
<div class="swiper-button-next"></div> |
| 167 |
<div class="swiper-button-prev"></div> |
| 168 |
|
| 169 |
</div> |
| 170 |
<!-- Pagination --> |
| 171 |
<div class="swiper-pagination"></div> |
| 172 |
</div> |
| 173 |
|
| 174 |
</div> |
| 175 |
</div> |
| 176 |
<!-- Right Banner Image --> |
| 177 |
<div class="col-lg-4 oe-education-slider-post-side-box"> |
| 178 |
<img src="<?php echo esc_url(isset($static_settings['corner_images'][0]) ? wp_get_attachment_url($static_settings['corner_images'][0]) : ''); ?>" alt=""> |
| 179 |
</div> |
| 180 |
<!-- End Right Banner Image --> |
| 181 |
<!-- sliding functionality end --> |
| 182 |
</div> |
| 183 |
|
| 184 |
|
| 185 |
<!-- End Middle Banner Box --> |
| 186 |
|
| 187 |
|
| 188 |
</div> |
| 189 |
<!-- End Row --> |
| 190 |
|
| 191 |
<!-- Video and Rating Section --> |
| 192 |
<div class="row oe-education-slider-video-row"> |
| 193 |
|
| 194 |
<!-- Empty Column (Placeholder) --> |
| 195 |
<div |
| 196 |
class="col-xl-4 col-lg-3 col-md-12 col-sm-12 col-12 oe-education-slider-content-inner-box align-self-center"> |
| 197 |
</div> |
| 198 |
|
| 199 |
<!-- Video and Rating Content --> |
| 200 |
<div |
| 201 |
class="col-xl-8 col-lg-12 col-md-12 col-sm-12 col-12 oe-education-slider-video-rating-content-box align-self-center"> |
| 202 |
<div class="row oe-education-video-rating"> |
| 203 |
|
| 204 |
|
| 205 |
<!-- Video Section --> |
| 206 |
<div class="col-lg-2 col-md-3 oe-education-slider-video-content-box position-relative"> |
| 207 |
<div class="oe-education-slider-video-image-box" style="background-image: url('<?php echo esc_url(isset($static_settings['video_bg_image']) ? $static_settings['video_bg_image'] : ''); ?>');"> |
| 208 |
<a class="oe-education-slider-video-icon-box myVideoBtns" |
| 209 |
data-url="<?php echo esc_url(isset($static_settings['slide_video_url']) ? $static_settings['slide_video_url'] : '#'); ?>" |
| 210 |
href="#myModal1" id="myBtn1"> |
| 211 |
<i class="fa fa-play"></i> |
| 212 |
</a> |
| 213 |
</div> |
| 214 |
<div id="myVideoNewModals" class="modal-new animated fadeInDownBig delay-1000" > |
| 215 |
<div class="modal-contents"> |
| 216 |
<button class="close-one">×<span class="screen-reader-text"> |
| 217 |
<?php echo esc_html('Close button', 'pet-care-pro'); ?></span></button> |
| 218 |
<embed id="videoEmbed" width="100%" height="345" src=""></embed> |
| 219 |
</div> |
| 220 |
</div> |
| 221 |
</div> |
| 222 |
<!-- End Video Section --> |
| 223 |
|
| 224 |
<!-- Rating Section --> |
| 225 |
<div class="col-lg-4 col-md-4 oe-education-slider-rating-content-box d-flex"> |
| 226 |
<div class="oe-education-slider-rating-img-box align-self-center"> |
| 227 |
<img src="<?php echo esc_url(isset($static_settings['mini_images_1'][0]) ? wp_get_attachment_url($static_settings['mini_images_1'][0]) : ''); ?>" |
| 228 |
alt=""> |
| 229 |
<p class="oe-education-slider-rating-text ov_social-template8"> |
| 230 |
<?php echo esc_html($static_settings['mini_titles'][0] ?? ''); ?></p> |
| 231 |
</div> |
| 232 |
|
| 233 |
|
| 234 |
<div class="circular-progress" |
| 235 |
data-percentage="<?php echo esc_attr($static_settings['static_loader_percentage'] ?? '90'); ?>" |
| 236 |
data-progress-color="crimson" data-bg-color="rgba(0,0,0,0.7)"> |
| 237 |
<div class="inner-circle"></div> |
| 238 |
<p class="percentage">0%</p> |
| 239 |
</div> |
| 240 |
|
| 241 |
|
| 242 |
</div> |
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
<!-- loader end --> |
| 247 |
<!-- End Rating Section --> |
| 248 |
|
| 249 |
<!-- Followers Section --> |
| 250 |
<div class="col-lg-5 col-md-5 oe-education-slider-followers-content-box d-flex"> |
| 251 |
<div class="oe-education-slider-progress-bar-box align-self-center"> |
| 252 |
<p class="oe-education-slider-followers-count"> |
| 253 |
<?php echo esc_html($static_settings['ov_template_review_no'] ?? '05k+'); ?></p> |
| 254 |
</div> |
| 255 |
<div class="oe-education-slider-followers-img-box align-self-center ps-4"> |
| 256 |
<p class="oe-education-slider-followers-text review-text-font"> |
| 257 |
<?php echo esc_html($static_settings['ov_template_review_text'] ?? ''); ?></p> |
| 258 |
<div class="oe-education-slider-social-icon-box d-flex left_menu_col"> |
| 259 |
<span class="oe-education-slider-follow-icon-box"> |
| 260 |
<div class="icons"><a |
| 261 |
href="<?php echo esc_url($static_settings['facebook_url'] ?? '#'); ?>" target="_blank"><i |
| 262 |
class="fa-brands fa-facebook-f"></i></a></div> |
| 263 |
<div class="icons"><a |
| 264 |
href="<?php echo esc_url($static_settings['instagram_url'] ?? '#'); ?>" target="_blank"><i |
| 265 |
class="fa-brands fa-instagram"></i></a></div> |
| 266 |
<div class="icons"><a |
| 267 |
href="<?php echo esc_url($static_settings['youtube_url'] ?? '#'); ?>" target="_blank"><i |
| 268 |
class="fa-brands fa-youtube"></i></a></div> |
| 269 |
<div class="icons"><a |
| 270 |
href="<?php echo esc_url($static_settings['basketball_url'] ?? '#'); ?>" target="_blank"><i |
| 271 |
class="fa-solid fa-basketball"></i></a></div> |
| 272 |
<div class="icons"><a |
| 273 |
href="<?php echo esc_url($static_settings['twitter_url'] ?? '#'); ?>" target="_blank"><i |
| 274 |
class="fa-brands fa-twitter"></i></a></div> |
| 275 |
|
| 276 |
</span> |
| 277 |
</div> |
| 278 |
</div> |
| 279 |
</div> |
| 280 |
<!-- End Followers Section --> |
| 281 |
|
| 282 |
</div> |
| 283 |
</div> |
| 284 |
<!-- End Video and Rating Content --> |
| 285 |
|
| 286 |
</div> |
| 287 |
<!-- End Video and Rating Section --> |
| 288 |
|
| 289 |
</div> |
| 290 |
<!-- End Slider Content Outer Box --> |
| 291 |
|
| 292 |
</div> |
| 293 |
<!-- End Container --> |
| 294 |
|
| 295 |
</div> |
| 296 |
<!-- End Slider Background Image Section --> |