I'm just getting my feet wet with creating a custom post type (which is up and running). I'd like to display the CPT alongside other posts on my homepage... I can't figure it out for the life of me. I'm hoping someone can see the error of my ways before I pull more hair out. I'm sure it's a rookie mistake, I have been staring at the screen perhaps a little too long... any help would be appreciated!

I've also come across a few articles suggesting pre\_get\_posts isn't a good idea.

I'm using a Woothemes Canvas Child Theme

---

Have a page called Home that uses the Canvas Magazine Template

so...

```
 function review_post() {

$labels = array(
      'name'=> _x( 'Reviews', 'Post Type General Name', 'text_domain' ),
      etc....

);

    $rewrite = array(
        'slug'=> 'review',
    etc...

);

$args = array(
     'label'               => __( 'post_review_key', 'text_domain' ),
    'description'         => __( 'Posts for Review Snippets', 'text_domain' ),
    'labels'              => $labels,
    'supports'            => array( 'title', 'editor', 'thumbnail', 'revisions', ),
    'taxonomies'          => array( 'reviews'),
    'hierarchical'        => false,
    'public'              => true,
    'show_ui'             => true,
    'show_in_menu'        => true,
    'show_in_nav_menus'   => true,
    'show_in_admin_bar'   => true,
    'menu_position'       => 5,
    'menu_icon'           => '/review-star-16x16.jpg',
    'can_export'          => true,
    'has_archive'         => true,
    'exclude_from_search' => false,
    'publicly_queryable'  => true,
    'rewrite'             => $rewrite,
    'capability_type'     => 'page',

);
    register_post_type( 'post_review_key', $args );

}

 // Hook into the 'init' action
add_action( 'init', 'review_post', 0 );

}

```

and then

```
add_action( 'pre_get_posts', 'add_my_post_types_to_query' );

function add_my_post_types_to_query( $query ) {
if ( is_home() && $query->is_main_query() )
    $query->set( 'post_type', array( 'post', 'review_post' ) );
return $query;
}

```