Advertisement
Guest User

home-testimonial.php

a guest
Aug 31st, 2015
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.18 KB | None | 0 0
  1. <div class="feature_section29">
  2.     <?php $wl_theme_options=get_option('guardian_options_pro'); ?>
  3.         <h2><?php
  4.         if($wl_theme_options['home_testi_title'] !='') { echo "<span style='color:#fff;'>".$wl_theme_options['home_testi_title']."</span>"; }
  5.             ?>
  6.         </h2><br/>
  7.     <div class="container">    
  8.         <div class="ms-staff-carousel ms-round">
  9.                 <!-- masterslider -->
  10.                 <div class="master-slider" id="masterslider5">
  11.                     <?php $all_posts = wp_count_posts( 'weblizar_testimonial')->publish;       
  12.                     $args = array( 'post_type' => 'weblizar_testimonial','posts_per_page' =>$all_posts);    
  13.                     $testimonial = new WP_Query( $args );        
  14.                     if( $testimonial->have_posts() )
  15.                     { while ( $testimonial->have_posts() ) : $testimonial->the_post();
  16.                         if(get_post_meta( get_the_ID(),'testimonial_link', true ))
  17.                         { $testimonial_link=get_post_meta( get_the_ID(),'testimonial_link', true ); }
  18.                         else { $testimonial_link = get_post_permalink(); }
  19.                         ?>
  20.                         <div class="ms-slide">                     
  21.                         <?php if(has_post_thumbnail()): ?>
  22.                         <?php the_post_thumbnail('home_test_thumb'); ?>
  23.                         <?php endif; ?>
  24.                         <div class="ms-info">
  25.                             <h4><a href="<?php echo $testimonial_link; ?>" <?php if(get_post_meta( get_the_ID(), 'testimonial_link_target', true )) { echo "target='_blank'"; } ?> ><?php the_title(); ?></a></h4>
  26.                             <h4>( <?php echo get_post_meta( get_the_ID(),'designation_meta_save', true ); ?> )</h4>
  27.                             <p><?php echo get_post_meta( get_the_ID(),'description_meta_save', true ); ?></p>
  28.                         </div>    
  29.                     </div>                 
  30.                     <?php endwhile;
  31.                     } else {
  32.                         for($i=1; $i<=5; $i++) { ?>                                
  33.                         <div class="ms-slide">
  34.                             <img src="js/masterslider/blank.gif" data-src="http://placehold.it/240x240" alt="" />
  35.                              <div class="ms-info">
  36.                                 <h4>Dan Mark</h4>
  37.                                 <h4>SEO Expert</h4>
  38.                                 <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt.</p>
  39.                             </div>          
  40.                         </div>
  41.                     <?php }
  42.                     } ?>
  43.                 </div>
  44.                 <!-- end of masterslider -->
  45.                 <div class="ms-staff-info" id="staff-info"> </div>
  46.             </div>
  47.     </div>
  48. </div><!-- end features section 29 -->
  49. <div class="clearfix"></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement