akhlesh_nagar

Untitled

Mar 9th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. <?php
  2. /**
  3. * @Theme Name : Quality-Pro
  4. * @file : index-client.php
  5. * @package : Quality-Pro
  6. * @author : Hari Maliya
  7. * @license : license.txt
  8. * @filesource : wp-content/themes/quality/index-slider.php
  9. */
  10. ?>
  11. <!-- Quality Cliens Section ---->
  12. <?php
  13. $quality_pro_options=theme_data_setup();
  14. $current_options = wp_parse_args( get_option( 'quality_pro_options', array() ), $quality_pro_options ); ?>
  15. <div class="container">
  16. <div class="row">
  17. <div class="qua_heading_title">
  18. <?php if($current_options['home_client_title']) { ?>
  19. <h1><?php echo $current_options['home_client_title']; ?></h1>
  20. <?php } ?>
  21. <?php if($current_options['home_client_desciption']) { ?>
  22. <p><?php echo $current_options['home_client_desciption']; ?></p>
  23. <?php } ?>
  24. <div class="qua-separator" id=""></div>
  25. </div>
  26. <div class="media_row">
  27. <?php
  28. $j=1;
  29. $count_posts = wp_count_posts( 'quality_clientstrip')->publish;
  30. $args = array( 'post_type' => 'quality_clientstrip','posts_per_page'=>$count_posts);
  31. $clientstrip = new WP_Query( $args );
  32. if( $clientstrip->have_posts())
  33. { while ( $clientstrip->have_posts() ) : $clientstrip->the_post(); ?>
  34. <?php $client_link=get_post_meta( get_the_ID(), 'clientstrip_link', true );?>
  35. <div class="media-column" style="<?php if($i % 4==0) { echo "clearfix;"; echo "border-right:none;"; } if($i >=$start & $i<=$end) { echo "border-bottom:none"; } ?>">
  36. <div class="media_image">
  37. <?php if(has_post_thumbnail()) : ?>
  38. <?php //$tt = the_title(); ?>
  39. <?php $tt = array('alt'=>"tt")?>
  40. <a href="<?php echo $client_link;?>" target="<?php if(get_post_meta( get_the_ID(),'meta_client_target', true )) echo "_blank"; ?>" style="height:105px; width:100px;" > <?php the_post_thumbnail('',$tt); ?></a>
  41. <?php else : ?>
  42. <img src="<?php echo WEBRITI_TEMPLATE_DIR_URI ?>/images/client/logo.png"/>
  43. <?php endif; ?>
  44. </div>
  45. </div>
  46. <?php
  47. if($j%4==0){ echo "<div class='clearfix'></div>"; } $j++; endwhile;
  48. }
  49. else {
  50. for($tt=1; $tt<=8; $tt++)
  51. { ?>
  52. <div class="media-column">
  53. <div class="media_image">
  54. <img src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/clients/sonny<?php echo $tt; ?>.png" class="img-responsive" title="Sonny">
  55. </div>
  56. </div>
  57. <?php
  58. }
  59. }
  60. ?>
  61. </div>
  62. </div>
  63. </div>
  64. <!-- /Quality Quality Cliens Section Section ---->
Add Comment
Please, Sign In to add comment