Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php //Template Name: Service One Template
- get_header();
- get_template_part('header_call_out');?>
- <!-- Main Content-->
- <div class="content-about margin-top60 margin-bottom60 margin-bottom160">
- <div class="container">
- <div class="row">
- <?php the_post();
- if(has_post_thumbnail()){
- $class = "img-responsive";?>
- <div class="posts-block col-lg-12 col-md-12 col-sm-12 col-xs-12">
- <?php the_post_thumbnail('service_one_img', $class); ?>
- </div>
- <?php } ?>
- </div>
- <div class="row padding-top40">
- <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 welcome-three">
- <h2><?php the_title(); ?></h2>
- <p>
- <?php the_content(); ?>
- </p>
- </div>
- </div>
- <div class="row padding-top60">
- <!-- Promo 1 -->
- <?php
- $all_posts = wp_count_posts( 'creative_service')->publish;
- $args = array('post_type'=>'creative_service', 'posts_per_page' =>$all_posts);
- $f_query = new WP_Query($args);
- $j=1;
- if($f_query->have_posts()){
- $x=1;
- while ($f_query->have_posts()) :
- $f_query->the_post(); if($x>6){ ?>
- <div class="col-lg-4 col-md-4 col-sm-4 wow swing">
- <div class="content-box big ch-item bottom-pad-small">
- <div class="ch-info-wrap">
- <div class="ch-info">
- <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>
- <?php if(get_post_meta(get_the_ID(),'service_icon','true') ){ ?>
- <div class="ch-info-back">
- <i class="<?php echo esc_attr(get_post_meta(get_the_ID(),'service_icon','true')); ?>"></i>
- </div>
- <?php } else if(has_post_thumbnail()){ $class = "img-responsive" ; ?>
- <div class="home_service_img">
- <?php the_post_thumbnail('home_service_img', $class); ?>
- </div>
- <?php } ?>
- </div>
- </div>
- <div class="content-box-info">
- <h3><?php the_title(); ?></h3>
- <p><?php echo wp_trim_words(esc_attr(get_post_meta(get_the_ID(),'service_description',true)),12,null); ?></p>
- <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>
- </div>
- <div class="border-bottom margin-top30">
- </div>
- <div class="border-bottom">
- </div>
- </div>
- </div>
- <?php if($j%3==0){ echo '<div class="clearfix"></div>'; } $j++; } $x++; endwhile; } else { ?>
- <?php $service_heading = array('Retina Ready', 'Premium Design', 'Responsive Design');
- $service_icon = array('fa-check', 'fa-tags', 'fa-rocket');
- for($i=0 ; $i<=2 ; $i++){
- ?>
- <div class="col-lg-4 col-md-4 col-sm-4 wow swing">
- <div class="content-box big ch-item bottom-pad-small">
- <div class="ch-info-wrap">
- <div class="ch-info">
- <div class="ch-info-front ch-img-1"><i class="fa <?php echo $service_icon[$i]; ?>"></i></div>
- <div class="ch-info-back">
- <i class="fa fa-check"></i>
- </div>
- </div>
- </div>
- <div class="content-box-info">
- <h3><?php echo $service_heading[$i]; ?></h3>
- <p>
- <?php _e('Lorem Ipsum is simply dummy text of Lorem the printing and typesettings industry.', 'creative'); ?>
- </p>
- <a href="#"><?php _e('Read More', 'creative'); ?> <i class="fa fa-angle-right"></i><i class="fa fa-angle-right"></i></a>
- </div>
- <div class="border-bottom margin-top30">
- </div>
- <div class="border-bottom">
- </div>
- </div>
- </div>
- <?php } ?>
- <?php } ?>
- <!-- /Promo 1 -->
- </div>
- </div>
- </div>
- <!-- /Main Content -->
- <?php get_template_part('footer','callout');
- get_template_part('home','client');
- get_footer(); ?>
Add Comment
Please, Sign In to add comment