Title: Custom post type in loop
Last modified: August 21, 2016

---

# Custom post type in loop

 *  Resolved [Stacy (non coder)](https://wordpress.org/support/users/functionmunchkin/)
 * (@functionmunchkin)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/custom-post-type-in-loop-1/)
 * Tried adding $query = new WP_Query( ‘post_type=products’ );
    in themefunctions
   and add_filter( ‘pre_get_posts’, ‘my_get_posts’ ); function my_get_posts( $query){
   if ( is_home() && $query->is_main_query()) $query->set( ‘post_type’, array( ‘
   post’,’product’ ) ); return $query; }
 * Still not showing the product post type.
 * This is a beautiful theme for any type of site. Thanks.

Viewing 1 replies (of 1 total)

 *  Thread Starter [Stacy (non coder)](https://wordpress.org/support/users/functionmunchkin/)
 * (@functionmunchkin)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/custom-post-type-in-loop-1/#post-4416523)
 * Solution: [http://wordpress.org/plugins/custom-post-type-selector/](http://wordpress.org/plugins/custom-post-type-selector/)

Viewing 1 replies (of 1 total)

The topic ‘Custom post type in loop’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/hatch/0.3.1/screenshot.png)
 * Hatch
 * [Support Threads](https://wordpress.org/support/theme/hatch/)
 * [Active Topics](https://wordpress.org/support/theme/hatch/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/hatch/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/hatch/reviews/)

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [Stacy (non coder)](https://wordpress.org/support/users/functionmunchkin/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/custom-post-type-in-loop-1/#post-4416523)
 * Status: resolved