Last active
November 10, 2016 01:43
-
-
Save titus-shoats/8402113b26fd447fa8e0 to your computer and use it in GitHub Desktop.
display custom post types
This file contains 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 | |
$args = array( | |
'post_type'=>'products' | |
); | |
$myproducts = new WP_Query($args); | |
while($myproducts->have_posts()) : $myproducts->the_post(); | |
?> | |
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> | |
<?php | |
endwhile; | |
wp_reset_postdata(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment