Created
August 10, 2017 12:05
-
-
Save imbdev/f15dbb31fb7eac7d45c45b1a8a5c0d45 to your computer and use it in GitHub Desktop.
Normal Praise WP Loop
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
<!--======================================== | |
= Normal Praise Loop = | |
=========================================--> | |
<section id="normal-praise-loop" class="container"> | |
<div id="primary" class="content-area col-md-12 col-lg-12"> | |
<main id="main" class="site-main" role="main"> | |
<?php | |
$args = array( | |
'post_type' => 'praises', | |
'posts_per_page' => -1 | |
); | |
$my_query = new WP_Query( $args ); | |
?> | |
<?php if ( $my_query->have_posts() ) : ?> | |
<?php while ( $my_query->have_posts() ) : $my_query->the_post(); ?> | |
<?php | |
$client_designation = get_field( 'client_designation' ); | |
$client_url = get_field( 'client_url' ); | |
$client_name = get_field( 'client_name' ); | |
?> | |
<section class="praise-block clearfix"> | |
<?php if ( has_post_thumbnail() ) : ?> | |
<div class="col-xs-12 col-sm-3 col-md-2 col-lg-2"> | |
<?php the_post_thumbnail('thumbnail', array('class' => 'img-circle')); ?> | |
</div> | |
<div class="col-xs-12 col-sm-9 col-md-10 col-md-10"> | |
<?php else : ?> | |
<div class="col-md-12 col-md-12 no-image"> | |
<?php endif; ?> | |
<article class="praise-text"> | |
<span class="icon-praise"><i class="fa fa-quote-left fa-2x"></i></span> | |
<h3><?php the_title(); ?></h3> | |
<?php the_content(); ?> | |
<span class="icon-praise pull-right"><i class="fa fa-quote-right fa-2x"></i></span> | |
</article> | |
<aside class="praise-title"> | |
<a href="<?php echo $client_url; ?>" title="Tiana Praise" target="_blank"><?php echo $client_name; ?></a> | <?php echo $client_designation; ?> | |
</aside> | |
</div> | |
</section> | |
<?php endwhile; ?> | |
<?php endif; ?> | |
<?php wp_reset_postdata(); ?> | |
</main><!-- #main --> | |
</div><!-- #primary --> | |
</section> <!-- End Container --> | |
<!--==== End of Normal Praise Loop ====--> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment