Created
October 20, 2015 19:12
-
-
Save mauriciogofas/e47b0c75f494a86be57b to your computer and use it in GitHub Desktop.
Custom post type Loop
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
<?php $rand_posts = get_posts('numberposts=1&post_type=videos'); | |
foreach ($rand_posts as $post) :?> | |
<a style="text-decoration:none; position:relative;" href="<?php the_permalink(); ?>"> | |
<h2 class="public-thumb"><?php the_title();?></h2> | |
<?php echo the_post_thumbnail( 'large' , 'class=home-thumb' ); ?> | |
</a> | |
<?php endforeach; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment