Created
September 3, 2020 06:12
-
-
Save vivirenremoto/3908c8cd7ab57dcaf2b836e85d5bd78f to your computer and use it in GitHub Desktop.
services.php petcare
This file contains 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
<!-- Services --> | |
<div class="container"> | |
<div class="row"> | |
<?php if ($petcare_option['Service-listing'] == "1") {?> | |
<!-- Display 3 services --> | |
<?php | |
$args = array( | |
'post_type' => 'Service', | |
'post_status' => 'publish', | |
'posts_per_page' => 4, | |
'orderby' => 'post_title', | |
'order' => 'ASC', | |
); | |
$loop = new WP_Query($args); | |
while ($loop->have_posts()): $loop->the_post(); | |
?> | |
<div class="col-md-3 col3"> | |
<a href="<?php if ($petcare_option['ext-service-link']) {echo $petcare_option['ext-service-link'];} else {the_permalink();}?>" class="roundal wow bounceInUp"><?php the_post_thumbnail();?></a> | |
<h3><?php the_title();?></h3> | |
<p><?php echo substr(get_the_excerpt(), 0, 150); ?>…</p> | |
<a href="<?php if ($petcare_option['ext-service-link']) {echo $petcare_option['ext-service-link'];} else {the_permalink();}?>" class="btn btn-default btn-green"><?php echo $petcare_option['ext-service-button'] ? $petcare_option['ext-service-button'] : $petcare_option['Button-text']; ?></a> | |
</div> | |
<?php endwhile;?> | |
<?php } elseif ($petcare_option['Service-listing'] == "2") {?> | |
<!-- Display 6 services --> | |
<?php | |
$args = array( | |
'post_type' => 'Service', | |
'post_status' => 'publish', | |
'posts_per_page' => 6, | |
); | |
$loop = new WP_Query($args); | |
while ($loop->have_posts()): $loop->the_post(); | |
?> | |
<div class="col-md-4 col3"> | |
<a href="<?php if ($petcare_option['ext-service-link']) {echo $petcare_option['ext-service-link'];} else {the_permalink();}?>" title="<?php the_title();?>" title="<?php the_title();?>" class="roundal wow rollIn"><?php the_post_thumbnail();?></a> | |
<h3><?php the_title();?></h3> | |
<p><?php echo substr(get_the_excerpt(), 0, 150); ?>…</p> | |
<a href="<?php if ($petcare_option['ext-service-link']) {echo $petcare_option['ext-service-link'];} else {the_permalink();}?>" class="btn btn-default btn-green"><?php echo $petcare_option['Button-text']; ?></a> | |
</div> | |
<?php endwhile;?> | |
<?php } elseif ($petcare_option['Service-listing'] == "3") {?> | |
<!-- Display 9 services --> | |
<?php | |
$args = array( | |
'post_type' => 'Service', | |
'post_status' => 'publish', | |
'posts_per_page' => 9, | |
); | |
$loop = new WP_Query($args); | |
while ($loop->have_posts()): $loop->the_post(); | |
?> | |
<div class="col-md-4 col3"> | |
<a href="<?php if ($petcare_option['ext-service-link']) {echo $petcare_option['ext-service-link'];} else {the_permalink();}?>" title="<?php the_title();?>" title="<?php the_title();?>" class="roundal wow bounceInUp"><?php the_post_thumbnail();?></a> | |
<h3><?php the_title();?></h3> | |
<p><?php echo substr(get_the_excerpt(), 0, 150); ?>…</p> | |
<a href="<?php if ($petcare_option['ext-service-link']) {echo $petcare_option['ext-service-link'];} else {the_permalink();}?>" class="btn btn-default btn-green"><?php echo $petcare_option['Button-text']; ?></a> | |
</div> | |
<?php endwhile;?> | |
<?php }?> | |
</div> | |
</div> | |
<!-- Services end --> | |
<br><br><br><br> | |
<div class="container"> | |
<?php | |
// opiniones google my business | |
echo do_shortcode('[reviews_rating]'); | |
?> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment