Title: How do I reference custom post types?
Last modified: August 21, 2016

---

# How do I reference custom post types?

 *  [@PhilipHoy](https://wordpress.org/support/users/venomphil/)
 * (@venomphil)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-reference-custom-post-types/)
 * Previously I have been using
 * `<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>`
 * to reference the posts on my website – How would i update that to reference my
   new custom post types? e.g. I’ve created on called articles
 * Thanks
 * [https://wordpress.org/plugins/types/](https://wordpress.org/plugins/types/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [@PhilipHoy](https://wordpress.org/support/users/venomphil/)
 * (@venomphil)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-reference-custom-post-types/#post-5142644)
 * No worries I’ve sorted it ^^
 * `<?php $the_query = new WP_Query( 'post_type=article' ); ?>`

Viewing 1 replies (of 1 total)

The topic ‘How do I reference custom post types?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/types_ced1d3.svg)
 * [Toolset Types - Custom Post Types, Custom Fields and Taxonomies](https://wordpress.org/plugins/types/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/types/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/types/)
 * [Active Topics](https://wordpress.org/support/plugin/types/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/types/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/types/reviews/)

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * 1 reply
 * 1 participant
 * Last reply from: [@PhilipHoy](https://wordpress.org/support/users/venomphil/)
 * Last activity: [11 years, 10 months ago](https://wordpress.org/support/topic/how-do-i-reference-custom-post-types/#post-5142644)
 * Status: not resolved