Post By Email
[resolved] Setting Custom Post Type (5 posts)

  1. listingwarebob
    Posted 2 years ago #

    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.


  2. Kat Hagan
    Plugin Author

    Posted 2 years ago #


    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?

  3. listingwarebob
    Posted 2 years ago #

    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!

  4. Barry Ceelen
    Posted 2 years ago #


    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 );
  5. Kat Hagan
    Plugin Author

    Posted 2 years ago #

    Barry... you are awesome. :D Thanks for posting this!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Post By Email
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic