Ejemplo n.º 1
0
<?php 
get_header();
?>
			
	
	<div id="feature" class="responsive-background" style="background-image:url(<?php 
background_featured_image();
?>
)">
		<div class="slider-container">
			<div class="column row">
				
				<?php 
if (is_plugin_active('LayerSlider/layerslider.php')) {
    layerslider(1);
}
?>

			</div>
		</div>
	</div> <!-- end #feature -->
	
	<?php 
if (is_active_sidebar('homepage_callout')) {
    ?>
	<div class="homepage-callout lower-shadow">
		<div class="row">
			<?php 
    dynamic_sidebar('homepage_callout');
    ?>
Ejemplo n.º 2
0
 function om_layerslider($id = 0, $page = '')
 {
     global $wpdb;
     $exists = $wpdb->get_row("\n\t\t\tSELECT EXISTS(\n\t\t\t\tSELECT * FROM " . $wpdb->prefix . "layerslider\n\t\t\t\tWHERE id = " . (int) $id . " AND flag_hidden = '0'\tAND flag_deleted = '0'\n\t\t\t)", ARRAY_N);
     if ($exists[0] && function_exists('layerslider')) {
         //om_layerslider_enqueue();
         layerslider($id, $page);
     }
 }
 function slideshow($element)
 {
     extract($element['saved'][0]);
     $output = '<div class="span' . $dynamic_size . ' dynamic_slideshow">';
     switch ($dynamic_which_post_page) {
         case 'post':
             $query_id = $dynamic_post_id;
             $type = 'post';
             break;
         case 'page':
             $query_id = $dynamic_page_id;
             $type = 'page';
             break;
         case 'self':
             $query_id = $this->post_id;
             $type = get_post_type($this->post_id);
             break;
     }
     $query_post = array('p' => $query_id, 'posts_per_page' => 1, 'post_type' => $type);
     $additional_loop = new WP_Query($query_post);
     if ($additional_loop->have_posts()) {
         while ($additional_loop->have_posts()) {
             $additional_loop->the_post();
             if ($dynamic_which_post_page != 'self' && $query_id != $this->post_id) {
                 global $more;
                 $more = 0;
             }
             if (!$additional_loop->post->post_excerpt || $query_id == $this->post_id) {
                 if (themeple_post_meta(get_the_ID(), '_slideshow_type') != 'layer_slider' || $type == 'post') {
                     $slider = new themeple_slideshow(get_the_ID(), themeple_post_meta(get_the_ID(), '_slideshow_type'));
                     if ($slider) {
                         $sliderHtml = $slider->display();
                         $output .= $sliderHtml;
                     }
                 } else {
                     if (themeple_post_meta(get_the_ID(), '_slideshow_type') == 'layer_slider') {
                         $slider = new themeple_slideshow(get_the_ID(), 'layer_slider');
                         if ($slider) {
                             $slider->options['layer_slider_id'] = themeple_post_meta(get_the_ID(), '_slideshow_layer_slider');
                             ob_start();
                             layerslider($slider->options['layer_slider_id'] + 1);
                             $output .= ob_get_clean();
                         }
                     }
                 }
             }
         }
     }
     $output .= '</div>';
     return $output;
 }
Ejemplo n.º 4
0
		<figure class="full-width">
			<?php 
    the_post_thumbnail(Everything::to_('general/layout')->value() == 'boxed' ? 'max-width' : 'full-hd');
    ?>
		</figure>

	<?php 
} elseif ($banner['type'] == 'slider' && preg_match('/^(?P<type>(layer|master|rev)slider)-(?P<id>[0-9]+)$/', $banner['slider'], $m)) {
    // Slider
    ?>

		<?php 
    switch ($m['type']) {
        case 'layerslider':
            if (Everything::isPluginActive('layerslider')) {
                layerslider($m['id']);
            }
            break;
        case 'masterslider':
            if (Everything::isPluginActive('masterslider')) {
                masterslider($m['id']);
            }
            break;
        case 'revslider':
            if (Everything::isPluginActive('revslider')) {
                putRevSlider($m['id']);
            }
            break;
    }
    ?>
Ejemplo n.º 5
0
<?php

/**
 * @package WordPress
 * @subpackage Your Inspiration Themes
 */
$slider_type = yit_slide_get('slider_type');
$slider = yit_slide_get('layer_slider_layer-slider');
?>
 
<!-- START SLIDER -->
<div id="slider-<?php 
echo $current_slider;
?>
"<?php 
yit_slider_class();
?>
> 
    <div class="shadowWrapper">
        <?php 
layerslider($slider);
?>
        <div class="shadow-left"></div>
        <div class="shadow-right"></div>
    </div>
</div>
<!-- END SLIDER -->
Ejemplo n.º 6
0
 /**
  * Slideshow controller.
  *
  */
 function presscore_slideshow_controller()
 {
     global $post;
     $config = Presscore_Config::get_instance();
     if ('slideshow' != $config->get('header_title')) {
         return;
     }
     $slider_id = $config->get('slideshow_sliders');
     // turn off regular titles and breadcrumbs
     remove_action('presscore_before_main_container', 'presscore_page_title_controller', 16);
     if (dt_get_paged_var() > 1) {
         return;
     }
     switch ($config->get('slideshow_mode')) {
         case 'porthole':
             $class = 'fixed' == $config->get('slideshow_layout') ? 'class="fixed" ' : '';
             $height = absint($config->get('slideshow_slider_height'));
             $width = absint($config->get('slideshow_slider_width'));
             if (!$height) {
                 $height = 500;
             }
             if (!$width) {
                 $width = 1200;
             }
             printf('<div id="main-slideshow" %sdata-width="%d" data-height="%d" data-autoslide="%d" data-scale="%s" data-paused="%s"></div>', $class, $width, $height, absint($config->get('slideshow_autoslide_interval')), 'fit' == $config->get('slideshow_slider_scaling') ? 'fit' : 'fill', 'paused' == $config->get('slideshow_autoplay') ? 'true' : 'false');
             add_action('wp_footer', 'presscore_render_porthole_slider_data', 15);
             break;
         case 'photo_scroller':
             $slides = array();
             $slideshow = Presscore_Inc_Slideshow_Post_Type::get_by_id($slider_id);
             // prepare data
             if ($slideshow->have_posts()) {
                 while ($slideshow->have_posts()) {
                     $slideshow->the_post();
                     $media_items = get_post_meta($post->ID, '_dt_slider_media_items', true);
                     if (empty($media_items)) {
                         continue;
                     }
                     $slides = array_merge($slides, $media_items);
                 }
                 wp_reset_postdata();
             }
             $photo_scroller = new Presscore_PhotoScroller($slides, array('wrap_class' => 'fullscreen' == $config->get('slideshow.photo_scroller.layout') ? 'fullscreen-scroller' : '', 'background_color' => $config->get('slideshow.photo_scroller.background.color'), 'padding_top' => $config->get('slideshow.photo_scroller.padding.top'), 'padding_bottom' => $config->get('slideshow.photo_scroller.padding.bottom'), 'padding_side' => $config->get('slideshow.photo_scroller.padding.side'), 'autoplay' => 'play' == $config->get('slideshow.photo_scroller.autoplay.mode'), 'autoplay_speed' => $config->get('slideshow.photo_scroller.autoplay.speed'), 'thumbnails_visibility' => $config->get('slideshow.photo_scroller.thumbnails.visibility'), 'thumbnails_width' => $config->get('slideshow.photo_scroller.thumbnail.width'), 'thumbnails_height' => $config->get('slideshow.photo_scroller.thumbnail.height'), 'portrait_images_view' => array('max_width' => $config->get('slideshow.photo_scroller.behavior.portrait.width.max'), 'min_width' => $config->get('slideshow.photo_scroller.behavior.portrait.width.min'), 'fill_desktop' => $config->get('slideshow.photo_scroller.behavior.portrait.fill.desktop'), 'fill_mobile' => $config->get('slideshow.photo_scroller.behavior.portrait.fill.mobile')), 'landscape_images_view' => array('max_width' => $config->get('slideshow.photo_scroller.behavior.landscape.width.max'), 'min_width' => $config->get('slideshow.photo_scroller.behavior.landscape.width.min'), 'fill_desktop' => $config->get('slideshow.photo_scroller.behavior.landscape.fill.desktop'), 'fill_mobile' => $config->get('slideshow.photo_scroller.behavior.landscape.fill.mobile')), 'inactive_opacity' => $config->get('slideshow.photo_scroller.inactive.opacity'), 'show_overlay' => $config->get('slideshow.photo_scroller.overlay.enabled'), 'show_post_navigation' => false, 'show_share_buttons' => false));
             if ($photo_scroller->have_slides()) {
                 echo $photo_scroller->get_html();
             }
             break;
             /*
             			case 'metro':
             				$slideshow = Presscore_Inc_Slideshow_Post_Type::get_by_id( $slider_id );
             
             				// prepare data
             				if ( $slideshow->have_posts() ) {
             
             					$slideshow_objects = array();
             
             					while ( $slideshow->have_posts() ) {
             
             						$slideshow->the_post();
             
             						$media_items = get_post_meta( $post->ID, '_dt_slider_media_items', true );
             						if ( empty($media_items) ) {
             							continue;
             						}
             
             						$attachments_data = presscore_get_attachment_post_data( $media_items );
             
             						if ( count($attachments_data) > 1 ) {
             
             							$object = array();
             							foreach ( $attachments_data as $array ) {
             								$object[] = Presscoe_Inc_Classes_SwapperSlider::array_to_object( $array );
             							}
             						} else {
             
             							$object = Presscoe_Inc_Classes_SwapperSlider::array_to_object( current($attachments_data) );
             						}
             
             						$slideshow_objects[] = $object;
             					}
             					wp_reset_postdata();
             					
             					echo Presscoe_Inc_Classes_SwapperSlider::get_html( $slideshow_objects );
             				}
             				break;
             */
         /*
         			case 'metro':
         				$slideshow = Presscore_Inc_Slideshow_Post_Type::get_by_id( $slider_id );
         
         				// prepare data
         				if ( $slideshow->have_posts() ) {
         
         					$slideshow_objects = array();
         
         					while ( $slideshow->have_posts() ) {
         
         						$slideshow->the_post();
         
         						$media_items = get_post_meta( $post->ID, '_dt_slider_media_items', true );
         						if ( empty($media_items) ) {
         							continue;
         						}
         
         						$attachments_data = presscore_get_attachment_post_data( $media_items );
         
         						if ( count($attachments_data) > 1 ) {
         
         							$object = array();
         							foreach ( $attachments_data as $array ) {
         								$object[] = Presscoe_Inc_Classes_SwapperSlider::array_to_object( $array );
         							}
         						} else {
         
         							$object = Presscoe_Inc_Classes_SwapperSlider::array_to_object( current($attachments_data) );
         						}
         
         						$slideshow_objects[] = $object;
         					}
         					wp_reset_postdata();
         					
         					echo Presscoe_Inc_Classes_SwapperSlider::get_html( $slideshow_objects );
         				}
         				break;
         */
         case '3d':
             $class = '';
             $data_attr = '';
             $slider_layout = $config->get('slideshow_3d_layout');
             if (in_array($slider_layout, array('prop-fullwidth', 'prop-content-width'))) {
                 $class = 'prop-fullwidth' == $slider_layout ? 'class="fixed-height" ' : 'class="fixed" ';
                 $width = $config->get('slideshow_3d_slider_width');
                 $height = $config->get('slideshow_3d_slider_height');
                 $data_attr = sprintf(' data-width="%d" data-height="%d"', $width ? absint($width) : 2500, $height ? absint($height) : 1200);
             }
             printf('<div id="main-slideshow" %s><div class="three-d-slider"%s><span id="loading">0</span></div></div>', $class, $data_attr);
             add_action('wp_footer', 'presscore_render_3d_slider_data', 15);
             break;
         case 'revolution':
             $rev_slider = $config->get('slideshow_revolution_slider');
             if ($rev_slider && function_exists('putRevSlider')) {
                 echo '<div id="main-slideshow">';
                 putRevSlider($rev_slider);
                 echo '</div>';
             }
             break;
         case 'layer':
             $layer_slider = $config->get('slideshow_layer_slider');
             $layer_bg_and_paddings = $config->get('slideshow_layer_bg_and_paddings');
             if ($layer_slider && function_exists('layerslider')) {
                 echo '<div id="main-slideshow"' . ($layer_bg_and_paddings ? ' class="layer-fixed"' : '') . '>';
                 layerslider($layer_slider);
                 echo '</div>';
             }
     }
     // switch
 }
 /**
  * Slideshow controller.
  *
  */
 function presscore_slideshow_controller()
 {
     global $post;
     $config = Presscore_Config::get_instance();
     if ('slideshow' != $config->get('header_title')) {
         return;
     }
     // turn off regular titles and breadcrumbs
     remove_action('presscore_before_main_container', 'presscore_page_title_controller', 16);
     if (dt_get_paged_var() > 1) {
         return;
     }
     switch ($config->get('slideshow_mode')) {
         case 'revolution':
             $rev_slider = $config->get('slideshow_revolution_slider');
             if ($rev_slider && function_exists('putRevSlider')) {
                 echo '<div id="main-slideshow">';
                 putRevSlider($rev_slider);
                 echo '</div>';
             }
             break;
         case 'layer':
             $layer_slider = $config->get('slideshow_layer_slider');
             $layer_bg_and_paddings = $config->get('slideshow_layer_bg_and_paddings');
             if ($layer_slider && function_exists('layerslider')) {
                 echo '<div id="main-slideshow"' . ($layer_bg_and_paddings ? ' class="layer-fixed"' : '') . '>';
                 layerslider($layer_slider);
                 echo '</div>';
             }
     }
     // switch
     do_action('presscore_do_header_slideshow', $config->get('slideshow_mode'));
 }
Ejemplo n.º 8
0
<?php

/**
 * Template Name: Home
 * The template for displaying pages
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages and that
 * other "pages" on your WordPress site will use a different template.
 *
 * @package WordPress
 * @subpackage Twenty_Sixteen
 * @since Twenty Sixteen 1.0
 */
get_header();
layerslider(3);
?>
<!--<div
    class="fb-like"
    data-share="true"
    data-width="450"
    data-show-faces="true">
</div>-->
<div class="html-content">
    <h1 style="color: #ff0000;"><span style="font-size: 18pt; font-family: georgia, palatino;"><span style="color: #ff0000;">Những dự án nổi bật</span>&nbsp;</span></h1>
    <h1 class="viewall" style="color: #ff0000;"><a href="/tu-thien"><span style="color: #ff0000;">Xem Thêm</span>&nbsp;</span></a></h1>

</div>
<section class="main bg-gray">
    <div class="container">
        <!--        <div class="html-content">
Ejemplo n.º 9
0
        } else {
            if ($layerslider_id == '-1') {
                // For non-selected slider
                $layerslider_id = '-1';
                $no_slider_class = ' class="no-slider" ';
            }
        }
        echo '<div id="uxb-layerslider-container" ' . $slider_header_footer_style . ' >';
        echo '<div id="uxb-layerslider"' . $no_slider_class . '>';
        // If the user hasn't selected any active slider yet
        if ($layerslider_id == '-1') {
            echo '<div class="info box no-layerslider-box">' . __('You have not yet selected which LayerSlider to be used here. Please go to: "Theme Options > Home Slider > LayerSlider for Homepage".', 'uxbarn') . '</div>';
        } else {
            // else if it's selected, display on screen.
            if (function_exists('layerslider')) {
                layerslider((int) $layerslider_id);
            }
        }
        echo '</div>';
        // close id="uxb-layerslider"
        echo '</div>';
        // close id="uxb-layerslider-container"
        ?>
  <?php 
    }
    // END: if($slider_type == 'basic-slider')
    ?>
<!-- END::HOME-SLIDER -->

<!-- PAGE-SLIDER -->
<?php 
Ejemplo n.º 10
0
            ?>
		<header id="header-main" class="slide-menu">
			<?php 
            putRevSlider($smof_data['revolution_slider']);
            ?>
 
		</header>
	<?php 
        }
        ?>
	<?php 
        if ($smof_data['type_home_section'] == 'layerslider') {
            ?>
		<header id="header-main" class="slide-menu">
			<?php 
            layerslider($smof_data['layer_slider']);
            ?>
 
		</header>
	<?php 
        }
    }
}
if ($smof_data['menu_position'] == 'after_header_menu') {
    ?>
			<!-- MAIN MENU -->	<div id="nav-main" class="sticky-menu">		<div class="container">			<div class="row">				<div class="col-md-12">					<div id="logo-container"><div class="tb"><div class="tb-cell">						<a href="<?php 
    echo home_url();
    ?>
">						<?php 
    if ($smof_data['logo_image']) {
        ?>
Ejemplo n.º 11
0
 /**
  * Slideshow controller.
  *
  */
 function presscore_slideshow_controller()
 {
     global $post;
     $config = Presscore_Config::get_instance();
     if ('slideshow' != $config->get('header_title')) {
         return;
     }
     $slider_id = $config->get('slideshow_sliders');
     // turn off regular titles and breadcrumbs
     remove_action('presscore_before_main_container', 'presscore_page_title_controller', 16);
     if (dt_get_paged_var() > 1) {
         return;
     }
     switch ($config->get('slideshow_mode')) {
         case 'porthole':
             $class = 'fixed' == $config->get('slideshow_layout') ? 'class="fixed" ' : '';
             $height = absint($config->get('slideshow_slider_height'));
             $width = absint($config->get('slideshow_slider_width'));
             if (!$height) {
                 $height = 500;
             }
             if (!$width) {
                 $width = 1200;
             }
             printf('<div id="main-slideshow" %sdata-width="%d" data-height="%d" data-autoslide="%d" data-scale="%s" data-paused="%s"></div>', $class, $width, $height, absint($config->get('slideshow_autoslide_interval')), 'fit' == $config->get('slideshow_slider_scaling') ? 'fit' : 'fill', 'paused' == $config->get('slideshow_autoplay') ? 'true' : 'false');
             add_action('wp_footer', 'presscore_render_porthole_slider_data', 15);
             break;
         case 'metro':
             $slideshow = Presscore_Inc_Slideshow_Post_Type::get_by_id($slider_id);
             // prepare data
             if ($slideshow->have_posts()) {
                 $slideshow_objects = array();
                 while ($slideshow->have_posts()) {
                     $slideshow->the_post();
                     $media_items = get_post_meta($post->ID, '_dt_slider_media_items', true);
                     if (empty($media_items)) {
                         continue;
                     }
                     $attachments_data = presscore_get_attachment_post_data($media_items);
                     if (count($attachments_data) > 1) {
                         $object = array();
                         foreach ($attachments_data as $array) {
                             $object[] = Presscoe_Inc_Classes_SwapperSlider::array_to_object($array);
                         }
                     } else {
                         $object = Presscoe_Inc_Classes_SwapperSlider::array_to_object(current($attachments_data));
                     }
                     $slideshow_objects[] = $object;
                 }
                 wp_reset_postdata();
                 echo Presscoe_Inc_Classes_SwapperSlider::get_html($slideshow_objects);
             }
             break;
         case '3d':
             $class = '';
             $data_attr = '';
             $slider_layout = $config->get('slideshow_3d_layout');
             if (in_array($slider_layout, array('prop-fullwidth', 'prop-content-width'))) {
                 $class = 'prop-fullwidth' == $slider_layout ? 'class="fixed-height" ' : 'class="fixed" ';
                 $width = $config->get('slideshow_3d_slider_width');
                 $height = $config->get('slideshow_3d_slider_height');
                 $data_attr = sprintf(' data-width="%d" data-height="%d"', $width ? absint($width) : 2500, $height ? absint($height) : 1200);
             }
             printf('<div id="main-slideshow" %s><div class="three-d-slider"%s><span id="loading">0</span></div></div>', $class, $data_attr);
             add_action('wp_footer', 'presscore_render_3d_slider_data', 15);
             break;
         case 'revolution':
             $rev_slider = $config->get('slideshow_revolution_slider');
             if ($rev_slider && function_exists('putRevSlider')) {
                 echo '<div id="main-slideshow">';
                 putRevSlider($rev_slider);
                 echo '</div>';
             }
             break;
         case 'layer':
             $layer_slider = $config->get('slideshow_layer_slider');
             $layer_bg_and_paddings = $config->get('slideshow_layer_bg_and_paddings');
             if ($layer_slider && function_exists('layerslider')) {
                 echo '<div id="main-slideshow"' . ($layer_bg_and_paddings ? ' class="layer-fixed"' : '') . '>';
                 layerslider($layer_slider);
                 echo '</div>';
             }
     }
     // switch
 }
Ejemplo n.º 12
0
				</div>
			<?php 
}
?>

			<?php 
if ($slider == "yes") {
    ?>
				<!-- BEGIN .slider-content -->
				<div class="slider-content">
					
					<!-- BEGIN .wrapper -->
					<div class="wrapper">

						<?php 
    layerslider($sliderId);
    ?>
						
					<!-- END .wrapper -->
					</div>
					
				<!-- END .slider-content -->
				</div>	
			<?php 
}
?>
		
			<!-- BEGIN .content -->
			<div class="content">
				
				<!-- BEGIN .wrapper -->
<?php

/*
Template Name: Front Page With Layer/Revolution Slider
*/
get_header();
// slider
$type = get_field('slider_type');
if ('layer' === $type && function_exists('layerslider')) {
    // layer slider
    layerslider((int) get_field('layerslider_id'));
} else {
    if ('revolution' === $type && function_exists('putRevSlider')) {
        // revolution slider
        putRevSlider(get_field('revolution_slider_alias'));
    }
}
?>

<div class="container" role="main">
	<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        the_content();
    }
}
?>
</div>

<?php