Created
November 15, 2015 13:19
-
-
Save matheuswd/2b769c07f53b91d9ee7d to your computer and use it in GitHub Desktop.
How to get a custom value from a Custom Post Type
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 $get_custom_value = new WP_Query( array( 'post_type' => 'yourposttypehere', 'posts_per_page' => -1 ) ); ?> | |
<?php while ( $get_custom_value->have_posts() ) : $get_custom_value->the_post(); ?> | |
<!-- The stuff you want to loop goes in here --> | |
<?php endwhile; wp_reset_query(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment