daily pastebin goal
24%
SHARE
TWEET

Untitled

a guest Mar 10th, 2019 16 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3. * @Theme Name   :   wallstreet-Pro
  4. * @file         :   index-service.php
  5. * @package      :   wallstreet-Pro
  6. @author       : webriti
  7. * @filesource   :   wp-content/themes/wallstreet/index-service.php
  8. */
  9. ?>
  10. <!-- wallstreet Service Section ---->
  11. <div class="service-section">
  12. <div class="container">
  13.     <?php $wallstreet_pro_options=theme_data_setup();
  14.         $current_options = wp_parse_args(  get_option( 'wallstreet_pro_options', array() ), $wallstreet_pro_options ); ?>
  15.     <div class="row">
  16.         <div class="section_heading_title">
  17.         <?php if($current_options['service_title']) { ?>
  18.             <h1><?php echo $current_options['service_title']; ?></h1>
  19.         <div class="pagetitle-separator">
  20.             <div class="pagetitle-separator-border">
  21.                 <div class="pagetitle-separator-box"></div>
  22.             </div>
  23.         </div>
  24.         <?php } ?>
  25.         <?php if($current_options['service_description']) { ?>
  26.             <p><?php echo $current_options['service_description']; ?></p>
  27.         <?php } ?>
  28.            
  29.         </div>
  30.     </div> 
  31.     <div class="row">
  32.     <?php
  33.     $j=1;
  34.     $total_services = $current_options['service_list'];
  35.     $args = array( 'post_type' => 'wallstreet_service','posts_per_page' =>$total_services);    
  36.     $service = new WP_Query( $args );
  37.     if( $service->have_posts() )
  38.     { while ( $service->have_posts() ) : $service->the_post();
  39.         $service_icon_image =sanitize_text_field( get_post_meta( get_the_ID(), 'service_icon_image', true ));
  40.         $service_icon_target =sanitize_text_field( get_post_meta( get_the_ID(), 'service_icon_target', true ));
  41.     ?>
  42.         <div class="col-md-3 col-sm-6 service-effect">
  43.             <?php if(get_post_meta( get_the_ID(),'meta_service_link', true ))
  44.                     { $meta_service_link=get_post_meta( get_the_ID(),'meta_service_link', true ); }
  45.                     else
  46.                     { $meta_service_link = "#"; }                      
  47.             ?>
  48.             <?php if(($service_icon_target) && ($service_icon_image)){ ?>
  49.                 <div class="other-service-area1">
  50.                     <?php if($meta_service_link){ ?>
  51.                         <a href="<?php echo $meta_service_link;  ?>" <?php if(get_post_meta( get_the_ID(),'meta_service_target', true )) { echo 'target="_blank"'; } ?>> <i class="fa <?php if($service_icon_image) { echo $service_icon_image; } ?>"></i> </a>
  52.                     <?php } else { ?>
  53.                         <i class="fa <?php if($service_icon_image) { echo $service_icon_image; } ?>"></i>
  54.                     <?php } ?>
  55.                 </div>
  56.             <?php } else {
  57.                 $defalt_arg =array('class' => "img-responsive");
  58.                 if(has_post_thumbnail()){ ?>
  59.                     <div class="service-box">
  60.                         <?php if($meta_service_link){ ?>
  61.                             <a href="<?php echo $meta_service_link;  ?>" <?php if(get_post_meta( get_the_ID(),'meta_service_target', true )) { echo 'target="_blank"'; } ?>> <?php the_post_thumbnail('webriti_service_img', $defalt_arg); ?> </a>
  62.                         <?php } else { ?>
  63.                             <?php the_post_thumbnail('webriti_service_img', $defalt_arg); ?>
  64.                         <?php } ?>
  65.                     </div>
  66.                 <?php } else { ?>
  67.                     <div class="other-service-area1">
  68.                     <i class="fa" style="font-size:24px;"><?php _e('Icon','wallstreet'); ?></i>
  69.                     </div>
  70.                 <?php }
  71.             } ?>
  72.             <div class="service-area">
  73.             <h2><a href="<?php echo $meta_service_link; ?>" <?php  if(get_post_meta( get_the_ID(),'meta_service_target', true )) { echo "target='_blank'"; }  ?> > <?php echo the_title(); ?> </a></h2>
  74.             <p><?php echo $excerpt = get_post_meta( get_the_ID(),'service_description_text', true ); ?></p>
  75.             <?php if(get_post_meta( get_the_ID(),'service_readmore_text', true )) { ?>
  76.             <div class="service-btn"><a href="<?php echo $meta_service_link; ?>" <?php  if(get_post_meta( get_the_ID(),'meta_service_target', true )) { echo "target='_blank'"; }  ?> ><?php echo get_post_meta( get_the_ID(),'service_readmore_text', true );  ?></a></div>
  77.             <?php } ?>
  78.             </div><!-- / service-area -->
  79.         </div> <!-- / service-effect column -->
  80.     <?php
  81.     if($j%4==0){ echo "<div class='clearfix'></div>"; } $j++; endwhile;
  82.     } else {
  83.         $service_defualttext =array( __('Product designing','wallstreet'), __('WordPress themes','wallstreet'), __('Responsive designs','wallstreet'));    
  84.         for($i=1; $i<=3; $i++) {    ?>     
  85.         <div class="col-md-4 col-sm-6 service-effect">
  86.             <div class="service-box">
  87.                 <img class="img-responsive" src="<?php echo WEBRITI_TEMPLATE_DIR_URI; ?>/images/service<?php echo $i; ?>.jpg">
  88.             </div>
  89.             <div class="service-area">
  90.             <h2><a href="#"><?php echo $service_defualttext[$i-1]; ?></a></h2>
  91.             <p><?php echo 'Lorem ipsum dolor sit amet, consectetur adipisicing elit.Lorem ipsum dolor sit amet, consectetur adipisicing elit dignissim dapib tumst dign eger porta nisl.'; ?></p>
  92.             <div class="service-btn"><a href="#"><?php _e('Read More','wallstreet'); ?></a></div>
  93.             </div>
  94.         </div>
  95.         <?php }}?>
  96.        
  97.    
  98.        
  99.     </div> 
  100. </div>
  101.     <div class="ser_btn_div">
  102. <a class="flex_btn" href="#">
  103. Contact us <i class="fa fa-chevron-circle-right"></i>
  104. </a>
  105. </div>
  106. </div>
  107. <!-- /wallstreet Service Section ---->
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top