Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created November 30, 2018 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/3dfb6107be416872305c7d2e1461d3da to your computer and use it in GitHub Desktop.
Save billerickson/3dfb6107be416872305c7d2e1461d3da to your computer and use it in GitHub Desktop.
<?php
$args = array(
'post_type' =&gt; 'my_post_type',
'my_custom_taxonomy' =&gt; 'custom_taxonomy',
'orderby' =&gt; 'post_date',
'order' =&gt; 'DIS'
);
$loop = new WP_Query( $args );
if( $loop-&gt;have_posts() ):
while( $loop-&gt;have_posts() ): $loop-&gt;the_post(); global $post;
echo ''. get_the_post_thumbnail( $id ).'';
echo '';
echo '' . get_the_title() . '';
echo '' . get_the_excerpt() . '<a href="'. get_the_permalink() .'" rel="nofollow">...discover more</a>';
echo '';
echo '';
endwhile;
endif;
echo '<!-- end -->';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment