Skip to content

Instantly share code, notes, and snippets.

@eclarrrk
Created June 28, 2017 15:04
Show Gist options
  • Save eclarrrk/e2e465be18d3a3746510cab67d7cb16c to your computer and use it in GitHub Desktop.
Save eclarrrk/e2e465be18d3a3746510cab67d7cb16c to your computer and use it in GitHub Desktop.
<?php
$lastposts = get_posts( array(
'numberposts' => 99,
'post_type' => 'team_member')
);
if ( $lastposts ) {
foreach ( $lastposts as $post ) :
setup_postdata( $post );
// Put your code between here...
echo '<h3>';
echo the_title();
echo '</h3>';
echo the_content();
?> <p> <?php
echo the_field('pork_ice_cream_recipe');
?> </p> <?php
// ...and here
endforeach;
wp_reset_postdata();
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment