Guest User

Untitled

a guest
May 13th, 2018
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php $elitepress_lite_options=theme_data_setup();
  2. $current_options = wp_parse_args( get_option( 'elitepress_lite_options', array() ), $elitepress_lite_options ); ?>
  3. <!-- Service Section -->
  4. <?php if($current_options['service_section_enabled'] == true) { ?>
  5. <div class="service-section">
  6. <div class="container">
  7.  
  8. <!-- Section Title -->
  9. <div class="row">
  10. <div class="col-md-12 col-sm-12">
  11. <div class="section-info">
  12. <?php if($current_options['service_title']) { ?>
  13. <h3 class="section-title"><?php echo esc_html($current_options['service_title']); ?></h3>
  14. <?php }
  15. if($current_options['service_description']) { ?>
  16. <p class="section-description"><?php echo esc_html($current_options['service_description']); ?></p>
  17. <?php } ?>
  18. </div>
  19. </div>
  20. </div>
  21. <!-- /Section Title -->
  22. <!-- Service Area -->
  23. <div class="row">
  24. <?php
  25. $j=1;
  26. $default_arg =array('class' => "index_ser_img img-responsive" );
  27. $total_services = $current_options['service_list'];
  28. $args = array( 'post_type' => 'elitepress_service', 'posts_per_page' => $total_services);
  29. $service = new WP_Query( $args );
  30. if( $service->have_posts() )
  31. {
  32. while ( $service->have_posts() ) : $service->the_post(); ?>
  33. <div class="col-md-6 col-sm-6">
  34. <?php
  35. if(get_post_meta( get_the_ID(),'service_more_btn_link', true ))
  36. { $service_more_btn_link=get_post_meta( get_the_ID(),'service_more_btn_link', true ); }
  37. else
  38. { $service_more_btn_link = ""; } ?>
  39. <div class="media service-area">
  40. <?php $default_arg =array('class' => "service-img-box" );
  41. if(has_post_thumbnail()){ ?>
  42. <div class="service-box"><?php the_post_thumbnail('', $default_arg); ?></div>
  43. <?php } else { ?>
  44.  
  45. <?php if(get_post_meta( get_the_ID(),'service_icon_image', true )){ ?>
  46. <a href="<?php echo $service_more_btn_link ?>" <?php if(get_post_meta( get_the_ID(), 'service_more_btn_target', true )){ echo "target='_blank'"; } ?> >
  47.  
  48. <div class="service-box"><i class="fa <?php echo get_post_meta( get_the_ID(),'service_icon_image', true ); ?>"></i></div>
  49. </a>
  50. <?php } } ?>
  51. <div class="media-body">
  52. <h4><a href="<?php echo $service_more_btn_link ?>" <?php if(get_post_meta( get_the_ID(), 'service_more_btn_target', true )){ echo "target='_blank'"; } ?> ><?php echo the_title(); ?></a></h4>
  53. <?php echo get_home_service_excerpt(); ?>
  54. <?php if(get_post_meta( get_the_ID(), 'service_more_btn_text', true )) { ?>
  55. <?php if($service_more_btn_link) { ?>
  56. <div class="service-btn"><a title="Read More" href="<?php echo $service_more_btn_link; ?>" <?php if(get_post_meta( get_the_ID(), 'service_more_btn_target', true )){ echo "target='_blank'"; } ?> ><?php echo get_post_meta( get_the_ID(), 'service_more_btn_text', true ); ?><i class="fa fa-angle-right"></i></a></div>
  57. <?php } else { ?>
  58. <div class="service-btn service_btn_text"><?php echo get_post_meta( get_the_ID(), 'service_more_btn_text', true ); ?><i class="fa fa-angle-right"></i></div>
  59. <?php } } ?>
  60. </div>
  61. </div>
  62. </div>
  63. <?php if($j%2==0){ echo "<div class='clearfix'></div>"; } $j++; endwhile;
  64. } else {
  65. $service_defualttext = array(__('Responsive design','elitepress'), __('Twitter Bootstrap 3.2.0','elitepress'),
  66. __('Exclusive support','elitepress'), __('Incredibly flexible','elitepress'));
  67. $font_awesome_icon = array('fa-laptop', 'fa-gift', '
  68. fa-thumbs-o-up', 'fa-mobile');
  69. for($i=0; $i<=3; $i++) { ?>
  70. <div class="col-md-6 col-sm-6">
  71. <div class="media service-area">
  72. <div class="service-box"><i class="fa <?php echo $font_awesome_icon[$i]; ?>"></i></div>
  73. <div class="media-body">
  74. <h4><a href="#"><?php echo $service_defualttext[$i]; ?></a></h4>
  75. <p><?php echo 'Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Cras mattis consectetur purus sit amet ferment etiam porta sem malesuada magna mollis.'; ?></p>
  76. <div class="service-btn"><a title="Read More" href="#"><?php _e('Read More', 'elitepress'); ?><i class="fa fa-angle-right"></i></a></div>
  77. </div>
  78. </div>
  79. </div>
  80. <?php } } ?>
  81.  
  82. </div>
  83. <!-- /Service Area -->
  84. </div>
  85. </div>
  86. <div class="clearfix"></div>
  87. <?php } ?>
  88. <!-- /Service Section -->
RAW Paste Data