Last active
January 9, 2017 14:09
-
-
Save mizner/0d2ebfa6ff2266051d0249f5aa78e9bf to your computer and use it in GitHub Desktop.
Wordpress Query Custom Post Type (Testimonial)
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
<?php | |
$the_query = new WP_Query( array( | |
'post_type' => 'jetpack-testimonial', | |
'posts_per_page' => '3' | |
) ); | |
while ( $the_query->have_posts() ) : $the_query->the_post(); ?> | |
<div class="testimonial"> | |
<h4><?php echo the_title(); ?></h4> | |
<?php echo the_content(); ?> | |
</div> | |
<?php | |
endwhile; | |
wp_reset_postdata(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment