Guest User

service-three

a guest
Jan 14th, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.36 KB | None | 0 0
  1. <?php //Template name: Service Template 3
  2.  
  3. get_header();
  4.  
  5. get_template_part('blog','cover'); ?>
  6.  
  7. <div class="container-fluid services space">
  8.  
  9. <div class="container">
  10.  
  11. <div class="col-md-12 service-content"><?php the_post();
  12.  
  13. the_content(); ?>
  14.  
  15. </div>
  16.  
  17. <div class="row">
  18.  
  19. <?php $args = array( 'post_type' => 'hc_services','posts_per_page' =>-1);
  20.  
  21. $service = new WP_Query( $args );
  22.  
  23. if( $service->have_posts() ){
  24.  
  25. while ( $service->have_posts() ) : $service->the_post(); ?>
  26.  
  27. <?php if(get_post_meta( get_the_ID(), 'service_button_link', true )){ $service_link= get_post_meta( get_the_ID(), 'service_button_link', true ); }else{ $service_link= get_the_permalink(); } ?>
  28.  
  29. <div class="col-md-4 col-sm-6 service">
  30.  
  31. <?php if(has_post_thumbnail()){ $thumbs = "img-responsive service_home_thumb" ; ?>
  32.  
  33. <a href="<?php echo $service_link; ?>" <?php if(get_post_meta( get_the_ID(),'service_button_target', true )) { echo 'target="_blank"'; }?> >
  34.  
  35. <div class="img-thumbnail">
  36.  
  37. <?php the_post_thumbnail('service_home_thumb', $thumbs); ?>
  38.  
  39. </div>
  40.  
  41. </a>
  42.  
  43. <?php }else if(get_post_meta( get_the_ID(), 'service_font_awesome_icons', true )){ ?>
  44.  
  45. <a class="icon-link" href="<?php echo $service_link; ?>" <?php if(get_post_meta( get_the_ID(),'service_button_target', true )) { echo 'target="_blank"'; }?> >
  46.  
  47. <span class="<?php echo get_post_meta( get_the_ID(), 'service_font_awesome_icons', true ); ?> icon"></span>
  48.  
  49. </a>
  50.  
  51. <?php } ?>
  52.  
  53. <div class="col-md-12">
  54.  
  55. <h3><a href="<?php echo $service_link; ?>" <?php if(get_post_meta( get_the_ID(),'service_button_target', true )) { echo 'target="_blank"'; }?> ><?php the_title(); ?></a></h3>
  56.  
  57. <p><?php the_excerpt(); ?></p>
  58.  
  59. </div>
  60.  
  61. </div>
  62. <?php endwhile;
  63.  
  64. }else{
  65.  
  66. for($i=1; $i<=6; $i++){ ?>
  67.  
  68. <a href="">
  69.  
  70. <div class="col-md-4 col-sm-6 service">
  71.  
  72. <span class="fa fa-ambulance icon"></span>
  73.  
  74. <div class="col-md-12">
  75.  
  76. <h3>Psychological Counceling</h3>
  77.  
  78. <p>We Will put together a detailed and specific style guide that covers all areas of your brand to ansure that anything.</p>
  79.  
  80. </div>
  81.  
  82. </div>
  83.  
  84. </a>
  85.  
  86. <?php } } ?>
  87.  
  88. </div>
  89.  
  90. </div>
  91.  
  92. </div>
  93.  
  94. <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment