Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @Theme Name : Quality-Pro
- * @file : index-service.php
- * @package : Quality-Pro
- * @author : Hari Maliya
- * @license : license.txt
- * @filesource : wp-content/themes/quality/index-service.php
- */
- ?>
- <!-- Quality Service Section ---->
- <div class="container">
- <?php $quality_pro_options=theme_data_setup();
- $current_options = wp_parse_args( get_option( 'quality_pro_options', array() ), $quality_pro_options ); ?>
- <div class="row">
- <div class="qua_heading_title">
- <?php if($current_options['service_title']) { ?>
- <h1><?php echo $current_options['service_title']; ?></h1>
- <?php } ?>
- <?php if($current_options['service_description']) { ?>
- <p><?php echo $current_options['service_description']; ?></p>
- <?php } ?>
- <div class="qua-separator" id=""></div>
- </div>
- </div>
- <div class="row">
- <?php
- $j=1;
- $total_services = $current_options['service_list'];
- $args = array( 'post_type' => 'quality_service','posts_per_page' =>$total_services);
- $service = new WP_Query( $args );
- if( $service->have_posts() )
- { while ( $service->have_posts() ) : $service->the_post(); ?>
- <div class="col-md-4 col-sm-6 qua-service-area">
- <?php
- if(get_post_meta( get_the_ID(),'meta_service_link', true ))
- { $meta_service_link=get_post_meta( get_the_ID(),'meta_service_link', true ); }
- else
- { $meta_service_link = ""; }
- ?>
- <?php if(has_post_thumbnail()){ ?>
- <?php if($meta_service_link){ ?>
- <a href="<?php echo $meta_service_link; ?>" <?php if(get_post_meta( get_the_ID(),'meta_service_target', true )) { echo "target='_blank'"; } ?>>
- <?php $default_arg =array('class' => "img-responsive" );
- the_post_thumbnail('',$default_arg);?>
- </a><?php } else {
- $default_arg =array('class' => "img-responsive" );
- the_post_thumbnail('',$default_arg);} ?>
- <?php } else { ?>
- <div class="hexagon-box">
- <?php if($meta_service_link){ ?>
- <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 echo get_post_meta( get_the_ID(),'service_icon_image', true ) ; ?>"></i></a>
- <?php } else { ?>
- <i class="fa <?php echo get_post_meta( get_the_ID(),'service_icon_image', true ) ; ?>"></i>
- <?php } ?>
- </div>
- <?php } ?>
- <?php if($meta_service_link){ ?>
- <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>
- <p><?php echo $excerpt = get_post_meta( get_the_ID(),'service_description_text', true ); ?></p>
- <?php if(get_post_meta( get_the_ID(),'service_readmore_text', true )) { ?>
- <p><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></p>
- <?php } ?>
- <?php } else { ?>
- <h2> <?php echo the_title(); ?> </h2>
- <p><?php echo $excerpt = get_post_meta( get_the_ID(),'service_description_text', true ); ?></p>
- <?php if(get_post_meta( get_the_ID(),'service_readmore_text', true )) { ?>
- <p><a href="" <?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></p>
- <?php } ?>
- <?php } ?>
- </div>
- <?php if($j%3==0){ echo "<div class='clearfix'></div>"; } $j++; endwhile;
- } else {
- $fontawsome =array('fa-shield', 'fa-tablet', 'fa-edit', 'fa-star-half-o');
- $serivec_defualttext =array('Fully Responsive', 'SEO Friendly', 'Easy Customization', 'Well Documentation');
- for($i=0; $i<3; $i++) { ?>
- <div class="col-md-4 col-sm-6 qua-service-area">
- <div class="hexagon-box">
- <a href=""><i class="fa <?php echo $fontawsome[$i]; ?>"></i></a>
- </div>
- <h2><a href="#"><?php echo $serivec_defualttext[$i]; ?></a></h2>
- <p><?php _e('Lorem Ipsum which looks reason able. The generated Lorem Ipsum is therefore always free.','quality'); ?></p>
- <p><a href="#"><?php _e('Read more','quality'); ?></a></p>
- </div>
- <?php }
- }
- ?>
- </div>
- </div>
- <!-- /Quality Service Section ---->
Add Comment
Please, Sign In to add comment