WordPress.org

Plugin Directory

Custom Post Type Creator

WCK Post Type Creator gives you the possibility to create and edit custom post types for WordPress.

Querying by post type in the frontend?

You can create new queries to display posts from a specific post type. This is done via the “post_type” parameter to a WP_Query.

Example:

<?php $args = array( 'post_type' => 'product', 'posts_per_page' => 10 );
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
    the_title();
    echo '<div class="entry-content">';
    the_content();
    echo '</div>';
endwhile;?>

This simply loops through the latest 10 product posts and displays the title and content of them.

Requires: 3.1 or higher
Compatible up to: 3.5.2
Last Updated: 2013-5-9
Active Installs: 800+

Ratings

3 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,3,3
100,1,1
100,1,1
0,1,0