iterate_post-type.php

<?php $query = new WP_Query( array( 'post_type' => '<post-type-name>' ) ); if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); } } ?>
Iterate a specific post-type

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.