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?
- New post status for custom post type
- How can I filter posts by post_parent in the admin?
- Rewriting ‘rewrite’ slug for custom post type used by plugin
- Using Templates with Custom Post Type UI
- WordPress Custom Post Type Admin Page really slow
- How to setup a Custom Taxonomy Term template
- Creating a gallery of featured images from custom post type
- Retrieve a specific field from taxonomy term through advanced custom fields [closed]
- Warning when attempting to edit/add custom post type
- How does register_post_type know how and which function to use from the add_action function?
- Are there sub-systems in WordPress that would employ data structures beyond CPT that a `get_posts` won’t be able to catch?
- List Post Title by Last Word Then Second Last
- Query custom post type with tags
- Custom post type conditional in loop
- Why cant I add a custom post type to a custom taxonomy?
- the_post_thumbnail call removing li in code
- How to display custom post type tags?
- Featured image size in column
- Page Template Dropdown For Custom Post Types
- Get_the_terms restrict output
- Can I query posts by taxonomy conditionally based on post type?
- Include custom post type custom taxonomies in Categories widget
- Break up posts per page in two sections
- post_content is stripping HTML when adding a new post? [closed]
- Dynamic category name in query post
- Ignores post_type when no results
- Can I decide what categories show on my posts page?
- WordPress – display relationship between blog posts and custom posts
- WP_Query to display number of custom post type filtered (order by) taxonomy
- Sort loop by custom field from different post type
- Custom meta box data not saving
- Custom meta-box for all custom post types
- Retrieve a specific category of posts when using a custom post type
- General question about Parent and Child Post type relationships
- WordPress Load more posts by ajax not working
- Multiple while loops not functioning [closed]
- Listing all custom post types using a specific term on the said term’s template page, in groups
- taxonomies or categories w/custom post
- Require Custom Taxonomy for Custom Type