Guest User

service-one-template

a guest
Jun 6th, 2016
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.81 KB | None | 0 0
  1. <?php //Template Name: Service One Template
  2. get_header();
  3. get_template_part('header_call_out');?>
  4. <!-- Main Content-->
  5. <div class="content-about margin-top60 margin-bottom60 margin-bottom160">
  6. <div class="container">
  7. <div class="row">
  8. <?php the_post();
  9. if(has_post_thumbnail()){
  10. $class = "img-responsive";?>
  11. <div class="posts-block col-lg-12 col-md-12 col-sm-12 col-xs-12">
  12. <?php the_post_thumbnail('service_one_img', $class); ?>
  13. </div>
  14. <?php } ?>
  15. </div>
  16. <div class="row padding-top40">
  17. <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 welcome-three">
  18. <h2><?php the_title(); ?></h2>
  19. <p>
  20. <?php the_content(); ?>
  21. </p>
  22. </div>
  23. </div>
  24. <div class="row padding-top60">
  25. <!-- Promo 1 -->
  26. <?php
  27. $all_posts = wp_count_posts( 'creative_service')->publish;
  28. $args = array('post_type'=>'creative_service', 'posts_per_page' =>$all_posts);
  29. $f_query = new WP_Query($args);
  30. $j=1;
  31. if($f_query->have_posts()){
  32. $x=1;
  33. while ($f_query->have_posts()) :
  34.  
  35. $f_query->the_post(); if($x>6){ ?>
  36. <div class="col-lg-4 col-md-4 col-sm-4 wow swing">
  37. <div class="content-box big ch-item bottom-pad-small">
  38. <div class="ch-info-wrap">
  39. <div class="ch-info">
  40. <div class="ch-info-front ch-img-1"><i class="<?php echo esc_attr(get_post_meta(get_the_ID(),'service_icon','true')); ?>"></i></div>
  41. <?php if(get_post_meta(get_the_ID(),'service_icon','true') ){ ?>
  42. <div class="ch-info-back">
  43. <i class="<?php echo esc_attr(get_post_meta(get_the_ID(),'service_icon','true')); ?>"></i>
  44. </div>
  45. <?php } else if(has_post_thumbnail()){ $class = "img-responsive" ; ?>
  46. <div class="home_service_img">
  47. <?php the_post_thumbnail('home_service_img', $class); ?>
  48. </div>
  49. <?php } ?>
  50. </div>
  51. </div>
  52. <div class="content-box-info">
  53. <h3><?php the_title(); ?></h3>
  54. <p><?php echo wp_trim_words(esc_attr(get_post_meta(get_the_ID(),'service_description',true)),12,null); ?></p>
  55. <a href="<?php echo esc_attr(get_post_meta(get_the_ID(),'service_link','true')); ?>" <?php if(get_post_meta(get_the_ID(),'service_button_target','true')){ echo "target='_blank'"; } ?>><?php _e('Read More','creative'); ?> <i class="fa fa-angle-right"></i><i class="fa fa-angle-right"></i></a>
  56. </div>
  57. <div class="border-bottom margin-top30">
  58. </div>
  59. <div class="border-bottom">
  60. </div>
  61. </div>
  62. </div>
  63. <?php if($j%3==0){ echo '<div class="clearfix"></div>'; } $j++; } $x++; endwhile; } else { ?>
  64. <?php $service_heading = array('Retina Ready', 'Premium Design', 'Responsive Design');
  65. $service_icon = array('fa-check', 'fa-tags', 'fa-rocket');
  66. for($i=0 ; $i<=2 ; $i++){
  67. ?>
  68. <div class="col-lg-4 col-md-4 col-sm-4 wow swing">
  69. <div class="content-box big ch-item bottom-pad-small">
  70. <div class="ch-info-wrap">
  71. <div class="ch-info">
  72. <div class="ch-info-front ch-img-1"><i class="fa <?php echo $service_icon[$i]; ?>"></i></div>
  73. <div class="ch-info-back">
  74. <i class="fa fa-check"></i>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="content-box-info">
  79. <h3><?php echo $service_heading[$i]; ?></h3>
  80. <p>
  81. <?php _e('Lorem Ipsum is simply dummy text of Lorem the printing and typesettings industry.', 'creative'); ?>
  82. </p>
  83. <a href="#"><?php _e('Read More', 'creative'); ?> <i class="fa fa-angle-right"></i><i class="fa fa-angle-right"></i></a>
  84. </div>
  85. <div class="border-bottom margin-top30">
  86. </div>
  87. <div class="border-bottom">
  88. </div>
  89. </div>
  90. </div>
  91. <?php } ?>
  92. <?php } ?>
  93. <!-- /Promo 1 -->
  94. </div>
  95. </div>
  96. </div>
  97. <!-- /Main Content -->
  98. <?php get_template_part('footer','callout');
  99. get_template_part('home','client');
  100. get_footer(); ?>
Add Comment
Please, Sign In to add comment