Skip to content

Instantly share code, notes, and snippets.

@billerickson billerickson/archive.php Secret
Created Nov 30, 2018

Embed
What would you like to do?
<?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
You can’t perform that action at this time.