If you have registered that CPT and added uploads functionality, then you can write email functionality in that only. However, if it comes from any other plugin or theme, then either you will need to edit its code or create a plugin if sufficient hook is available.
If there is no custom hook available and you are going to use some generic WordPress hook e.g. save_post
for your attachment, then make sure to check for your CPT’s post type before running email functionality, otherwise it will be applied for all the attachments.
e.g. you can check on save_post
hook, if the post_type
is attachment
and the current screen is of your CPT, then send email.
Related Posts:
- Possible to hide Custom Post Type UI/Menu from specific User Roles?
- WordPress dashboard, viewing CPT results in 504
- Displaying Custom Post Types In “At A Glance” Meta Box
- Show Custom Taxonomy Inside Custom Menu
- Adding Custom Post Type Counts to the Dashboard
- How to Make an admin_notices Message That Disappears Once the User Leaves That Particular Page?
- Sanitizing post content for use in an email
- Custom post type without editor or revisions – Notify on update?
- How to auto send email when publishing a custom post type?
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- Adding help information to custom post edit page
- Post Via Email to a Custom Post Type
- Display only custom post type count for current author on the “At a Glance” dashboard widget
- How can I show some description in the “All Posts” view of a custom post type in Dashboard?
- Add custom post types stats to a custom dashboard widget
- How to redirect wp-admin/index.php to a custom post type?
- Separate comment section for post type in dashboard
- right_now_content_table_end function not working?
- Email friend for each Custom Post Type posts on a page
- Send email button in custom post type backend
- Customize the Dashboard Menu Editor
- filter custom post type by meta key in dashboard
- Notify admin on new submit
- Team club with CPTs and user registration + user dashboard
- Cluster CPT posts to users based on ACF value from their profile on dashboard
- get_post_meta returning no value in custom post type alert email
- Adding the_content() in custom template email
- How can the recipients and content for comment email notifications on a custom post type be changed?
- How to insert data into meta box from another plugin?
- Generate new post from email
- List Custom Post Types in Admin Dashboard
- Send email messages after comment was submitted
- Send post changes to set email addresses (not users or subscribers)
- Add data to post edit page, when post is published
- Modifying Dashboard edit.php
- Adding link to dashboard sidebar, nested under custom post type
- Extending post by email
- allowing custom user role to access custom post type in wordpress admin
- See if the email exists or not
- Slow CPT in backend
- CPT email notification including only new value custom fields
- How can i redirect click to new admin page not to edit screen in post table
- Metabox collapsed by default
- Custom page for creating/editing custom post type
- Send email to author of the post when the custom post status changes to published
- Send mail to author when custom post type is saved
- Help Adding filter to Add Media button for custom post type
- Custom user roles
- Add role privileges of the custom post type
- BCC email to subscribers
- creating different edit screens for different roles
- send email to all registered users when post expires
- Change column of row action (Quick Edit) links in WP_List_Table
- Allow certain part of a page to be easily updated for client?
- How can I make a custom post type that loops pages in a new dashboard page, each single page is a new dashboard page (all within the back-end)?
- empty dashboard for custom role
- CPT Metabox with email notification
- Emailing Authors only when a CUSTOM POST TYPE post is published- not when edited later [duplicate]
- How to create a job post by email parsing? [closed]
- Send email on creation of custom post type and use get_post_meta()
- How to exclude a certain CPT from a snippet for Dashboard box?
- How to query 2 custom post types that need to share a slug?
- Slug for custom post type
- Custom Post type: Labels are not showing
- Get rid of “trash can” for custom post type
- Combine multiple getEntityRecords calls
- Custom post type editor uses old tinyMCE
- Checking if looped item has a parent inside a shortcode
- How to assign tag to custom post type in wordpress?
- Do posts, pages and / or custom post type objects have unique ID numbers or can there be multiple objects with the same IDs?
- Send a conditional email notification when a custom field value changes in Post Type
- Pagination custom post type not working with rewrite slug
- Pagination Not Working for Custom Taxonomy with Custom Query – 404 Error
- Check for a specific taxonomy of a custom post type
- Recoverable Fatal Error – Object of class WP_Post could not be converted to string
- Custom Post Type Slick Slider “$ is not a function”
- Get parent category id from child category page for custom taxonomy
- Make custom post type a media library
- Trying to get custom post of a custom taxonomy
- Custom Taxonomy Is Being Pulled into a Page, But It Doesn’t Have A Hyperlink
- Custom post type menu-icon not showing up
- Querying & displaying custom post type into an existent page [closed]
- WordPress custom post type capabilities issue
- Querying two taxonomies with tax_query not woking
- i cant see the max_num_pages of a custom wp query
- Enable Custom Fields For Custom Post Type When CPT Created Using Plugin
- How to get all post of custom post type by rest api?
- How can I group posts by months and years?
- Custom post type, global categories — what’s the template name?
- Custom rewrite to fetch feed data
- Rename a slug label
- Convert post type to another
- Pagination Error : Duplicate argument being outputted
- Create custom post with meta field with AJAX and the WordPress REST API
- WordPress wp_query() basic question about args
- how to remove pages loading with the archive templates
- Should I create Custom Page Types?
- Mutiple Select only POSTing 1 value
- Is it possible to show multiple (custom) post types at the wp homepage only by using pluging code?
- Get an array wich contains the post_name of every post that has the custom post_type “pelicula”