Title: Setting Custom Post Type
Last modified: August 21, 2016

---

# Setting Custom Post Type

 *  Resolved [listingwarebob](https://wordpress.org/support/users/listingwarebob/)
 * (@listingwarebob)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/setting-custom-post-type/)
 * Is it possible to have the ability to set the emails being read to a Custom Post
   Type (CPT) other than just ‘Post’? I have a very specific way I’d like to use
   this plugin, but that feature is required first.
 * [http://wordpress.org/plugins/post-by-email/](http://wordpress.org/plugins/post-by-email/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Contributor [Kat Hagan](https://wordpress.org/support/users/codebykat/)
 * (@codebykat)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/setting-custom-post-type/#post-4310021)
 * Hi,
 * There’s currently no way to do that, but I’ve added it to the list for the next
   version, which I’m working on over the next few weeks.
 * Would it work better to specify the post type via shortcode in the email, or 
   with a global option?
 *  Thread Starter [listingwarebob](https://wordpress.org/support/users/listingwarebob/)
 * (@listingwarebob)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/setting-custom-post-type/#post-4310024)
 * I think the best way would be to have a global default post type, but then be
   able to set it dynamically via shortcode. That seems to cover most bases.
 * Thanks for considering the addition!
 *  [Barry Ceelen](https://wordpress.org/support/users/barryceelen/)
 * (@barryceelen)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/setting-custom-post-type/#post-4310048)
 * Hi,
 * In the meantime it is possible to hook into the Post By Email plugin to make 
   it save your email as a different post type. Something along these lines in your
   functions.php should work:
 *     ```
       add_action( 'publish_phone', array( $this, 'myfunctionprefix_set_post_type' ) );
   
       function myfunctionprefix_set_post_type( $post_ID ) {
       	$post = array(
       			'ID' => (int) $post_ID,
       			'post_type' => 'custom_post_type_slug_here'
       	);
       	wp_update_post( $my_post );
       }
       ```
   
 *  Plugin Contributor [Kat Hagan](https://wordpress.org/support/users/codebykat/)
 * (@codebykat)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/setting-custom-post-type/#post-4310111)
 * Barry… you are awesome. 😀 Thanks for posting this!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Setting Custom Post Type’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/post-by-email.svg)
 * [Post By Email](https://wordpress.org/plugins/post-by-email/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-by-email/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-by-email/)
 * [Active Topics](https://wordpress.org/support/plugin/post-by-email/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-by-email/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-by-email/reviews/)

## Tags

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

 * 4 replies
 * 3 participants
 * Last reply from: [Kat Hagan](https://wordpress.org/support/users/codebykat/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/setting-custom-post-type/#post-4310111)
 * Status: resolved