Guest User

Untitled

a guest
May 23rd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. <?php
  2. $current_options = wp_parse_args( get_option( 'busiprof_pro_theme_options', array() ), theme_data_setup() );
  3. require_once( BUSI_THEME_FUNCTIONS_PATH . '/scripts/clientjs-strip.php' );
  4. if( $current_options['home_client_section_enabled']=='on' ) {
  5. ?>
  6. <!-- Clients Section -->
  7. <section class="clients">
  8. <div class="container">
  9.  
  10. <!-- Section Title -->
  11. <div class="row">
  12. <div class="col-md-12">
  13. <div class="section-title">
  14. <h1 class="section-heading"><?php echo $current_options['client_title']; ?></h1>
  15. <p><?php echo $current_options['client_desc']; ?></p>
  16. </div>
  17. </div>
  18. </div>
  19. <!-- /Section Title -->
  20.  
  21. <div id="clients" class="flexslider carousel col-md-12">
  22. <ul class="slides">
  23. <?php
  24. /****check custom client strip*****/
  25. $count_posts = wp_count_posts( 'busiprof_clientstrip')->publish;
  26. $args = array( 'post_type' => 'busiprof_clientstrip','posts_per_page'=>$count_posts ) ;
  27.  
  28. $clientstrip = new WP_Query( $args );
  29.  
  30. if( $clientstrip->have_posts() )
  31. {
  32. while ( $clientstrip->have_posts() ) : $clientstrip->the_post();
  33.  
  34. $client_link = sanitize_text_field( get_post_meta( get_the_ID(), 'client_link', true ));
  35. ?>
  36. <li>
  37. <?php if(has_post_thumbnail()) { ?>
  38.  
  39. <a href="<?php if($client_link){ echo esc_html($client_link); } ?>" target="_blank" >
  40.  
  41. <?php the_post_thumbnail(''); } ?>
  42. </a>
  43.  
  44. </li>
  45. <?php endwhile;
  46. } else
  47. { for($i=0;$i<=12;$i++) { ?>
  48. <li>
  49. <img src="<?php echo BUSI_TEMPLATE_DIR_URI; ?>/images/clients/client1.png" />
  50. </li>
  51. <?php } }?>
  52. </ul>
  53. </div>
  54. </div>
  55. </section>
  56. <!-- End of Clients Section -->
  57.  
  58. <div class="clearfix"></div>
  59. <?php } ?>
Add Comment
Please, Sign In to add comment