Created
May 29, 2014 19:00
-
-
Save ZachMoreno/e00f0d09db3cb7001a3c to your computer and use it in GitHub Desktop.
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
<ul> | |
<?php | |
$topThreePostsArgs = array( | |
'post_type' => 'coastal_news' | |
); | |
// Query the Coastal News post type --> | |
$my_query = new WP_Query( $topThreePostsArgs ); | |
// While there are Coastal News items, loop through them as list items | |
while ($my_query->have_posts()) : $my_query->the_post(); | |
// Don't show duplicates | |
$do_not_duplicate = $post->ID; | |
?> | |
<li><?php the_title(); // or any other echo get(''); calls ?></li> | |
<?php endwhile; ?> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment