Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="ei-slider-container">
- <div id="ei-slider" class="ei-slider">
- <?php
- $all_posts = wp_count_posts( 'weblizar_slider')->publish;
- $args = array( 'post_type' => 'weblizar_slider','posts_per_page' =>$all_posts);
- $slider = new WP_Query( $args );
- if( $slider->have_posts() )
- { ?>
- <ul class="ei-slider-large">
- <?php while ( $slider->have_posts() ) : $slider->the_post(); ?>
- <li>
- <?php if(has_post_thumbnail()): ?>
- <?php $defalt_arg =array('class' => "img-responsive"); ?>
- <?php the_post_thumbnail('weblizar_slider', $defalt_arg); ?>
- <?php endif; ?>
- <!--<img src="<?php //echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slider1.jpg" alt="image05"/> -->
- <?php if(the_title() && get_post_meta( get_the_ID(),'slider_description', true )) { ?>
- <div class="ei-title">
- <h2 class="h2-section-title"><?php echo the_title(); ?></h2>
- <h3><?php if(get_post_meta( get_the_ID(),'slider_description', true )) { ?>
- <p><?php echo get_post_meta( get_the_ID(),'slider_description', true ); ?></p>
- <?php } ?> <br/><br/><br/>
- <?php if(get_post_meta( get_the_ID(),'slider_button_text', true ))
- { ?>
- <a href="<?php echo get_post_meta( get_the_ID(),'slider_button_link', true ); ?>" class="btn btn-default" <?php if(get_post_meta( get_the_ID(),'slider_button_target', true )) { echo "target='_blank'"; } ?>>
- <?php echo get_post_meta( get_the_ID(),'slider_button_text', true ); ?></a>
- <?php } ?>
- </h3>
- </div>
- <?php } ?>
- </li>
- <?php endwhile; ?>
- </ul>
- <ul class="ei-slider-thumbs">
- <li class="ei-slider-element">Current</li>
- <?php while ( $slider->have_posts() ) : $slider->the_post(); ?>
- <li><a href="<?php echo get_post_meta( get_the_ID(),'slider_button_link', true ); ?>"><?php echo the_title(); ?></a>
- <?php if(has_post_thumbnail()): ?>
- <?php $defalt_arg =array('class' => "img-responsive"); ?>
- <?php the_post_thumbnail('weblizar_slider', $defalt_arg); ?>
- <?php endif; ?>
- </li>
- <?php endwhile; ?>
- </ul><!-- ei-slider-thumbs -->
- <?php } else { ?>
- <ul class="ei-slider-large">
- <li>
- <img src="<?php echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slide-1.jpg" alt="image05"/>
- <div class="ei-title">
- <h2 class="h2-section-title">ABOUT US</h2>
- Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum,
- nec sagittis sem nibh id elit. Duis sed odio sit amet nibh vulputate cursus a sit amet mauris.
- <br/><br/><br/>
- <h3><a href="#" class="btn btn-default">Read More</a>
- </h3>
- </div>
- </li>
- <li>
- <img src="<?php echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slide-2.jpg" alt="image03"/>
- <div class="ei-title ei-title-right">
- <h2 class="h2-section-title">VERY FLEXIBLE</h2>
- Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum,
- nec sagittis sem nibh id elit. Duis sed odio sit amet nibh vulputate cursus a sit amet mauris.
- <br/>
- <h3><a href="#" class="btn btn-default">Read More</a></h3>
- </div>
- </li>
- <li>
- <img src="<?php echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slide-3.jpg" alt="image05"/>
- <div class="ei-title ei-title-left">
- <h2 class="h2-section-title">WELL DOCUMENTED</h2>
- Proin gravida nibh vel velit auctor aliquet. Aenean sollicitudin, lorem quis bibendum auctor, nisi elit consequat ipsum,
- nec sagittis sem nibh id elit. Duis sed odio sit amet nibh vulputate cursus a sit amet mauris.
- <br/>
- <h3><a href="#" class="btn btn-default">Read More</a></h3>
- </div>
- </li>
- </ul><!-- ei-slider-large -->
- <ul class="ei-slider-thumbs">
- <li class="ei-slider-element">Current</li>
- <li><a href="#">Slide 1</a><img src="<?php echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slide-1.jpg" alt="Slide 1" /></li>
- <li><a href="#">Slide 2</a><img src="<?php echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slide-2.jpg" alt="Slide 2" /></li>
- <li><a href="#">Slide 3</a><img src="<?php echo WEBLIZAR_TEMPLATE_DIR_URI; ?>/media/slide-3.jpg" alt="Slide 3" /></li>
- </ul><!-- ei-slider-thumbs -->
- <?php } ?>
- </div><!-- ei-slider -->
- </div>
Add Comment
Please, Sign In to add comment