|
@@ -7,62 +7,89 @@
|
|
*/
|
|
*/
|
|
function build_home_slider($atts, $content = null)
|
|
function build_home_slider($atts, $content = null)
|
|
{
|
|
{
|
|
-
|
|
|
|
- ob_start();
|
|
|
|
-
|
|
|
|
- echo '<div class="members-logo row"> <div id="logo-slider" class="owl-carousel">';
|
|
|
|
-
|
|
|
|
- if (have_rows('members_logo', 'option')) :
|
|
|
|
- while (have_rows('members_logo', 'option')) : the_row();
|
|
|
|
- $logo_url = get_sub_field('logo');
|
|
|
|
- $company_link = get_sub_field('link');
|
|
|
|
-
|
|
|
|
- echo '<div class="thumbnail thumbnail-hover">';
|
|
|
|
- echo '<img class="img-responsive" src=" ' . $logo_url . '">';
|
|
|
|
- echo '<a href=" ' . $company_link . ' " " title=" ' . $company_link . ' " class="link-full"></a>';
|
|
|
|
- echo '</div>';
|
|
|
|
-
|
|
|
|
- endwhile;
|
|
|
|
- else :
|
|
|
|
- echo '<div class="col-xs-12">Members Logo Slider not found! <be> please add some logo in theme setting page</div>';
|
|
|
|
- endif;
|
|
|
|
- echo '</div></div>';
|
|
|
|
-
|
|
|
|
- $output = ob_get_clean();
|
|
|
|
- return $output;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-add_shortcode('home_slider', 'build_home_slider');
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * Shortcode: Member logo slider
|
|
|
|
- */
|
|
|
|
-function member_logo_slider($atts, $content = null)
|
|
|
|
-{
|
|
|
|
-
|
|
|
|
- ob_start();
|
|
|
|
-
|
|
|
|
- echo '<div class="members-logo row"> <div id="logo-slider" class="owl-carousel">';
|
|
|
|
-
|
|
|
|
- if (have_rows('members_logo', 'option')) :
|
|
|
|
- while (have_rows('members_logo', 'option')) : the_row();
|
|
|
|
- $logo_url = get_sub_field('logo');
|
|
|
|
- $company_link = get_sub_field('link');
|
|
|
|
-
|
|
|
|
- echo '<div class="thumbnail thumbnail-hover">';
|
|
|
|
- echo '<img class="img-responsive" src=" ' . $logo_url . '">';
|
|
|
|
- echo '<a href=" ' . $company_link . ' " " title=" ' . $company_link . ' " class="link-full"></a>';
|
|
|
|
- echo '</div>';
|
|
|
|
-
|
|
|
|
- endwhile;
|
|
|
|
- else :
|
|
|
|
- echo '<div class="col-xs-12">Members Logo Slider not found! <be> please add some logo in theme setting page</div>';
|
|
|
|
- endif;
|
|
|
|
- echo '</div></div>';
|
|
|
|
-
|
|
|
|
- $output = ob_get_clean();
|
|
|
|
- return $output;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-add_shortcode('members_logo', 'member_logo_slider');
|
|
|
|
|
|
+ ob_start(); ?>
|
|
|
|
+
|
|
|
|
+ <div class="banner-slider" data-banner-slider>
|
|
|
|
+ <button class="banner-slider-button prev" data-banner-slider-button="prev">
|
|
|
|
+ <span class="material-symbols-outlined">
|
|
|
|
+ arrow_back_ios
|
|
|
|
+ </span>
|
|
|
|
+ </button>
|
|
|
|
+ <button class="banner-slider-button next" data-banner-slider-button="next">
|
|
|
|
+ <span class="material-symbols-outlined">
|
|
|
|
+ arrow_forward_ios
|
|
|
|
+ </span>
|
|
|
|
+ </button>
|
|
|
|
+
|
|
|
|
+ <ul data-slides>
|
|
|
|
+ <?php
|
|
|
|
+
|
|
|
|
+ $i = 0;
|
|
|
|
+ if (have_rows('home_slider_slides', 'option')) :
|
|
|
|
+ while (have_rows('home_slider_slides', 'option')) : the_row();
|
|
|
|
+ $bg_image = get_sub_field('bg_image');
|
|
|
|
+ $sub_heading = get_sub_field('sub_heading');
|
|
|
|
+ $heading_main = get_sub_field('heading_main');
|
|
|
|
+ $text = get_sub_field('text');
|
|
|
|
+ ?>
|
|
|
|
+ <li class="slide" <?php if ($i == 0) {
|
|
|
|
+ echo 'data-active';
|
|
|
|
+ } ?>>
|
|
|
|
+ <div class="slider-single-div">
|
|
|
|
+ <img src="<?php echo $bg_image ?>" alt="">
|
|
|
|
+ <div class="banner-overlay">
|
|
|
|
+ <h4>Welcome to </h4>
|
|
|
|
+ <h1>United<br> International<br> University</h1>
|
|
|
|
+ <h3>
|
|
|
|
+ Department of <br>
|
|
|
|
+ Computer Science & Engineering
|
|
|
|
+ </h3>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </li>
|
|
|
|
+ <?php
|
|
|
|
+ $i = $i + 1;
|
|
|
|
+ endwhile;
|
|
|
|
+ else :
|
|
|
|
+ echo '<div class="col-xs-12">Members Logo Slider not found! <be> please add some logo in theme setting page</div>';
|
|
|
|
+ endif;
|
|
|
|
+ echo '</ul></div>';
|
|
|
|
+
|
|
|
|
+ $output = ob_get_clean();
|
|
|
|
+ return $output;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ add_shortcode('home_slider', 'build_home_slider');
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Shortcode: Member logo slider
|
|
|
|
+ */
|
|
|
|
+ function member_logo_slider($atts, $content = null)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ ob_start();
|
|
|
|
+
|
|
|
|
+ echo '<div class="members-logo row"> <div id="logo-slider" class="owl-carousel">';
|
|
|
|
+
|
|
|
|
+ if (have_rows('members_logo', 'option')) :
|
|
|
|
+ while (have_rows('members_logo', 'option')) : the_row();
|
|
|
|
+ $logo_url = get_sub_field('logo');
|
|
|
|
+ $company_link = get_sub_field('link');
|
|
|
|
+
|
|
|
|
+ echo '<div class="thumbnail thumbnail-hover">';
|
|
|
|
+ echo '<img class="img-responsive" src=" ' . $logo_url . '">';
|
|
|
|
+ echo '<a href=" ' . $company_link . ' " " title=" ' . $company_link . ' " class="link-full"></a>';
|
|
|
|
+ echo '</div>';
|
|
|
|
+
|
|
|
|
+ endwhile;
|
|
|
|
+ else :
|
|
|
|
+ echo '<div class="col-xs-12">Members Logo Slider not found! <be> please add some logo in theme setting page</div>';
|
|
|
|
+ endif;
|
|
|
|
+ echo '</div></div>';
|
|
|
|
+
|
|
|
|
+ $output = ob_get_clean();
|
|
|
|
+ return $output;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ add_shortcode('members_logo', 'member_logo_slider');
|