Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $args = array(
- 'post_type' => 'portfolio',
- 'posts_per_page' => 5
- );
- $the_query = new WP_Query( $args );
- if ( $the_query->have_posts() ) {
- while ( $the_query->have_posts() ) {
- $the_query->the_post(); ?>
- <h2><?php the_title(); ?></h2>
- <?php the_content(); ?>
- <?php } ?>
- <?php wp_reset_postdata(); ?>
- <?php } ?>
Add Comment
Please, Sign In to add comment