WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We're creating a site to showcase a series of archival recordings covering a wide variety of topics. We'd like to have a page in the main navigation (e.g. recordings) to display these by title, w/a browse by category option, and have heard the best way to do this is w/custom post types. We're able to start this setup by editing the functions.php page, as well as using the 'custom post UI' plugin, but do not understand how to actually show the custom posts, either in a list style on the recordings page, or otherwise. What is the next step? Any and all help is appreciated.


share|improve this question
up vote 0 down vote accepted

In the template for your recordings page you'll want to specify a custom query for the post type in question.

$rec_query = new WP_Query('post_type=recording');

And then later in your template, you will refer to the query object you created directly instead of relying on the default. For example:

while ($rec_query->have_posts()) : $rec_query->the_post();
share|improve this answer
Oh now I understand--we have to query the new post type.. will try this and let you know our progress. Thank you for your response. -Don – don de lion Mar 2 '11 at 5:41

If you are using the latest version of WordPress 3.1 the its very easy,

copy your themes single.php file in to a new file named single-recording.php and just before the line:




and if you want to create archive "like" display of you post type (similar to category listing but just for your post type) then copy your theme's archive.php file in to a new file named archive-recording.php and again before the :



$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
      'paged' => $paged,
      'post_type' => 'recording'


and to make sure the pagination works find the line that looks like this:

endwhile; else:

//and Reset Query by adding:
share|improve this answer
These responses are very helpful; am piecing these answers together now - will let you know how we progress. thanks so much. – don de lion Mar 2 '11 at 5:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.