• Resolved shubham1129

    (@shubham1129)


    I am using the postie plugin to add media directly from E-mail. For this, in postie setting, I select default post types as attachment. Because I don’t want to create any posts or pages. I just want to add attachments in media.
    When an email receives any attachment then it will automatically add this attachment into WordPress media. This is working fine but, with attachment, it creates an extra annoying item in media too which have no data and have slug like ?p=”200″ like in the images in the below URL.

    https://imgur.com/a/AfquZNb
    I just want a attachment in my media. No any extra things or no any new post.
    I need some help regarding this.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Wayne Allen

    (@wayneallen-1)

    Postie is doing exactly what you told it to do. It is creating an attachment post for each email. Postie automatically adds any valid attachments as media items, you don’t need to change the post type.

    You could try changing the default post type back to post and default post status to draft and that way the attachments will get added to the media library and the posts won’t get published. You will need to delete all the draft posts from time to time.

    Thread Starter shubham1129

    (@shubham1129)

    Okay, I will try this solution.
    Like just do not want any empty image in media and also not want any draft post. So any other solution for this?

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Not at the moment. Postie can be viewed as an alternative post editor. You wouldn’t expect the native post editor to just add media items without an associated post.

    You could create a Postie addon that uses the postie_post_before hook and returns null. That will upload the attachments and not create a post.

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Thread Starter shubham1129

    (@shubham1129)

    Okay, Thanks. I will try with some filters.

    Thread Starter shubham1129

    (@shubham1129)

    Thank you. This solution works for me. I used this filter “postie_post_before”.

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Excellent

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Post type attachment creates extra annoying item in media’ is closed to new replies.