Last active
October 6, 2016 13:04
-
-
Save aslamhindko/4bdd5df6055f2fa00dcda11174dea9ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ye pora page counter se dynemic banahowa hain wp ka | |
| <?php | |
| /** | |
| * Template Name: Treatment | |
| */ | |
| get_header(); ?> | |
| <?php $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(),'full', true); | |
| ?> | |
| <section class="treatmentpage" style="background: url(<?php echo $thumbnail[0]; ?>) no-repeat;"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12"> | |
| <h1><?php the_title(); ?></h1> | |
| <ol class="breadcrumb"> | |
| <li> | |
| <a href="<?php echo site_url(); ?>">Home</a> | |
| </li> | |
| <li class="active"><?php the_title(); ?></li> | |
| </ol> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <?php | |
| $wp_query->query(array( | |
| 'post_type'=>'services', | |
| 'service_category'=>'treatment', | |
| 'posts_per_page' => 6, | |
| 'order' => 'DSC', | |
| )); | |
| $count = 1; | |
| while ($wp_query->have_posts()) : $wp_query->the_post(); ?> | |
| <?php $lastimg = wp_get_attachment_image_src(get_post_thumbnail_id(),'full', true); ?> | |
| <?php if ($count == '1'): | |
| $count++; ?> | |
| <section class="our-clinic-treatment"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12 col-sm-12"> | |
| <h2><?php the_title( ); ?></h2> | |
| <p><?php the_excerpt(); ?></p> | |
| <a href="<?php the_permalink(); ?>" class="btn se-btn-white btn-rounded">Read More</a> | |
| </div> <!-- end se-feature --> | |
| </div> <!-- end row --> | |
| </div> <!-- end container --> | |
| </section> | |
| <?php elseif ($count == '2'): | |
| $count++; ?> | |
| <section class="post1"> | |
| <div class="col-3"> | |
| <img src="<?php echo $lastimg[0]; ?>" alt=""> | |
| </div> | |
| <div class="col-3 two"> | |
| <h2><?php the_title( ); ?></h2> | |
| <?php the_excerpt(); ?> | |
| <a href="#" class="btn-green">find out more</a> | |
| <a href="<?php the_permalink(); ?>" class="btn-gray">Book Now</a> | |
| </div> | |
| <div class="col-3"> | |
| <h2><?php the_title( ); ?></h2> | |
| <form class="form-horizontal"> | |
| <div class="form-group"> | |
| <label for="name" class="control-label col-xs-2">NAME</label> | |
| <div class="col-xs-9"> | |
| <input type="text" class="form-control"> | |
| </div> | |
| </div> | |
| <div class="form-group"> | |
| <label for="inputEmail" class="control-label col-xs-2">EMAIL</label> | |
| <div class="col-xs-9"> | |
| <input type="email" class="form-control"> | |
| </div> | |
| </div> | |
| <div class="form-group"> | |
| <label for="phone" class="control-label col-xs-2">PHONE</label> | |
| <div class="col-xs-9"> | |
| <input type="text" class="form-control"> | |
| </div> | |
| </div> | |
| <div class="form-group"> | |
| <div class="col-xs-11"> | |
| <textarea class="form-control" rows="4" placeholder="Message"></textarea> | |
| </div> | |
| </div> | |
| <a href="javascript:;" class="btn-green center-block">Submit</a> | |
| </form> | |
| </div> | |
| </section> | |
| <?php elseif ($count == '3'): | |
| $count++; ?> | |
| <section class="post6"> | |
| <div class="container"> | |
| <div class="row"> | |
| <h2><?php the_title( ); ?></h2> | |
| <?php the_excerpt(); ?> | |
| <div class="btn-center"> | |
| <a href="#" class="btn-green">find out more</a> | |
| <a href="<?php the_permalink(); ?>" class="btn-gray">Book Now</a> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <?php elseif ($count == '4'): | |
| $count++; ?> | |
| <section class="post2"> | |
| <div class="col-6"> | |
| <img src="<?php echo $lastimg[0]; ?>" alt=""> | |
| </div> | |
| <div class="col-6 two"> | |
| <h2><?php the_title( ); ?></h2> | |
| <?php the_excerpt(); ?> | |
| <a href="#" class="btn-green">find out more</a> | |
| <a href="<?php the_permalink(); ?>" class="btn-gray">Book Now</a> | |
| </div> | |
| </section> | |
| <?php elseif ($count == '5'): | |
| $count++; ?> | |
| <section class="our-clinic-treatment post3"> | |
| <div class="container"> | |
| <div class="row"> | |
| <div class="col-md-12 col-sm-12"> | |
| <h2><?php the_title( ); ?></h2> | |
| <?php the_excerpt(); ?> | |
| <div class="btn-center"> | |
| <a href="#" class="btn-white">find out more</a> | |
| <a href="<?php the_permalink(); ?>" class="btn-gray">Book Now</a> | |
| </div> | |
| </div> <!-- end se-feature --> | |
| </div> <!-- end row --> | |
| </div> <!-- end container --> | |
| </section> | |
| <?php elseif ($count == '6'): | |
| $count++; ?> | |
| <section class="post4"> | |
| <div class="col-6 two"> | |
| <h2><?php the_title( ); ?></h2> | |
| <?php the_excerpt(); ?> | |
| <a href="#" class="btn-green">find out more</a> | |
| <a href="<?php the_permalink(); ?>" class="btn-gray">Book Now</a> | |
| </div> | |
| <div class="col-6"> | |
| <img src="<?php echo $lastimg[0]; ?>" alt=""> | |
| </div> | |
| </section> | |
| <?php else: ?> | |
| <section class="post5"> | |
| <div class="col-30"> | |
| <img src="<?php echo $lastimg[0]; ?>" alt=""> | |
| </div> | |
| <div class="col-70 two"> | |
| <h2><?php the_title( ); ?></h2> | |
| <?php the_excerpt(); ?> | |
| <a href="#" class="btn-white">find out more</a> | |
| <a href="<?php the_permalink(); ?>" class="btn-gray">Book Now</a> | |
| </div> | |
| </section> | |
| <?php endif ?> | |
| <?php endwhile; ?> | |
| <?php get_footer(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment