Guest User

Untitled

a guest
Aug 16th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.65 KB | None | 0 0
  1. <?php
  2. /**
  3. * @Theme Name : wallstreet-Pro
  4. * @file : index-client.php
  5. * @package : wallstreet-Pro
  6. @author : webriti
  7. * @filesource : wp-content/themes/wallstreet/index-slider.php
  8. */
  9. ?>
  10. <!-- wallstreet Clients Section ---->
  11. <?php $wallstreet_pro_options=theme_data_setup();
  12. $current_options = wp_parse_args( get_option( 'wallstreet_pro_options', array() ), $wallstreet_pro_options ); ?>
  13. <div class="container client-section">
  14. <div class="row">
  15. <div class="section_heading_title">
  16. <?php if($current_options['home_client_title']) { ?>
  17. <h1><?php echo $current_options['home_client_title']; ?></h1>
  18. <div class="pagetitle-separator">
  19. <div class="pagetitle-separator-border">
  20. <div class="pagetitle-separator-box"></div>
  21. </div>
  22. </div>
  23. <?php } ?>
  24. <?php if($current_options['home_client_description']) { ?>
  25. <p><?php echo $current_options['home_client_description']; ?></p>
  26. <?php } ?>
  27.  
  28. </div>
  29. <div class="row">
  30. <?php
  31. $j=1;
  32. $args = array( 'post_type' => 'wallstreet_client');
  33. $client = new WP_Query( $args );
  34. if( $client->have_posts() ){
  35.  
  36. while ( $client->have_posts() ) : $client->the_post();
  37. ?>
  38. <div class="col-md-3">
  39. <div class="clients-logo">
  40. <?php
  41. $defalt_arg =array('class' => "img-responsive");
  42. if(has_post_thumbnail()):
  43. //the_post_thumbnail('',$defalt_arg);
  44. $post_thumbnail_id = get_post_thumbnail_id();
  45. $post_thumbnail_url = wp_get_attachment_url($post_thumbnail_id );
  46.  
  47. ?>
  48. <?php if($post_thumbnail_url) {?>
  49. <a href="<?php if(get_post_meta( get_the_ID(),'clientstrip_link', true ) ) { echo get_post_meta( get_the_ID(),'clientstrip_link', true ); } else { echo '#'; } ?>" <?php if(get_post_meta( get_the_ID(),'meta_client_target', true )) { echo "target='_blank'"; } ?> ><img class="img-responsive" title="<?php echo get_the_title(); ?>" src="<?php echo $post_thumbnail_url; ?>"></a>
  50. <?php } else { ?> <img class="img-responsive" title="<?php echo get_the_title(); ?>" src="<?php echo $post_thumbnail_url; ?>"><?php } ?>
  51. </div>
  52. </div>
  53. <?php
  54. if($j%4==0){ echo "<div class='clearfix'></div>"; } $j++;
  55.  
  56. endif;
  57. endwhile;
  58.  
  59. }
  60. else {
  61. for($tt=1; $tt<=4; $tt++)
  62. { ?>
  63. <div class="col-md-3">
  64. <div class="clients-logo">
  65. <img src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/clients/client<?php echo $tt; ?>.png" class="img-responsive" title="Sonny">
  66. </div>
  67. </div>
  68. <?php
  69. }
  70. }
  71. ?>
  72. </div>
  73. </div>
  74. </div>
  75. <!-- /wallstreet wallstreet Cliens Section Section ---->
Add Comment
Please, Sign In to add comment