Support » Plugin: Post By Email » Setting Custom Post Type

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Kat Hagan



    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?



    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



    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 Author Kat Hagan


    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.