Title: Custom Post Type
Last modified: August 22, 2016

---

# Custom Post Type

 *  Resolved [cmuld3r](https://wordpress.org/support/users/cmuld3r/)
 * (@cmuld3r)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-86/)
 * I have a blog setup as a custom post type. I like the plugin, but how can it 
   be used to send notifications for new custom post types?
 * [https://wordpress.org/plugins/email-subscribers/](https://wordpress.org/plugins/email-subscribers/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [gopi_plus](https://wordpress.org/support/users/gopi_plus/)
 * (@gopi_plus)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-86/#post-5333935)
 * In the notification setting page, We have option to select CATEGORY, MAIL SUBJECT,
   SUBSCRIBER GROUP. We are sending notification mail based on this setting.
 *  Thread Starter [cmuld3r](https://wordpress.org/support/users/cmuld3r/)
 * (@cmuld3r)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-86/#post-5333940)
 * In the settings I don’t see anything to use a custom post type. It seems by default
   notifications work for the default blog post type of ‘post’ and I don’t see settings
   to choose a custom post type instead. My blog instead is using a custom post 
   type with custom fields as well.
 * So custom post types are not supported? Any idea how I’d be able to modify the
   plugin to send a notification for a new entry of a custom post type with custom
   fields?
 *  [gopi_plus](https://wordpress.org/support/users/gopi_plus/)
 * (@gopi_plus)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-post-type-86/#post-5333947)
 * If you have special requirements, you can modify below mentioned page.
 * File : classes\es-sendmail.php
 * Whenever new posts published, that will trigger the method es_prepare_notification()
   in the above mentioned file name. You can modify that method as per your requirements.
   happy coding.
 *  [renathy](https://wordpress.org/support/users/renathy/)
 * (@renathy)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/custom-post-type-86/#post-5334111)
 * Above really helps. Can you, please, give information about how (were, which 
   file) to modify to create recently published posts list including custom post
   types?
 *  [gopi_plus](https://wordpress.org/support/users/gopi_plus/)
 * (@gopi_plus)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/custom-post-type-86/#post-5334120)
 * At present it will not support custom post type. i will include this option in
   future.
 *  Thread Starter [cmuld3r](https://wordpress.org/support/users/cmuld3r/)
 * (@cmuld3r)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/custom-post-type-86/#post-5334123)
 * This is how a developer I work with was able to get the plugin working with a
   custom post type we created:
 *     ```
       Line 77 ($category = get_the_category( $post_id );) in db_notification.php was commented out and replaced with $category = get_the_terms( $post_id, ‘category’ );. The get_the_category function does not work with CPT’s and get_the_terms is universal.
           CPT args included the following: ‘taxonomies’ => array('post_tag', 'category')
           Since the plugin only works when a category is assigned, the taxonomy 'category' was added to the CPT blog. Posts have a default category of ‘unassigned’ which is why it works with the plugin so I added an action for when posts are saved to add the category ‘unassigned’ if a category isn't assigned.
   
       add_action( 'save_post', 'set_default_category' ); function set_default_category( $post_id ) {
        // Get the terms
       $terms = wp_get_post_terms( $post_id, ‘category'); 
   
        // Only set default
       if no terms are set yet if (!$terms) {
        // Assign the default category $taxonomy = ‘category';
        wp_set_object_terms( $post_id, 1, $taxonomy );
        }
        }
       ```
   
 * Please let me know if you have any questions and if similar functionality will
   be included in a plugin update. Thank you!
 *  [TwoThirdsWater](https://wordpress.org/support/users/twothirdswater/)
 * (@twothirdswater)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/custom-post-type-86/#post-5334130)
 * The ability to use Custom Post Types would be great please.
 *  [gopi_plus](https://wordpress.org/support/users/gopi_plus/)
 * (@gopi_plus)
 * [11 years ago](https://wordpress.org/support/topic/custom-post-type-86/#post-5334133)
 * version 2.5
 * Now plugin supports custom post type. i.e. With this plugin version, you can 
   able to send automatic newsletter/notification emails when you publish custom
   posts.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Custom Post Type’ is closed to new replies.

 * ![](https://ps.w.org/email-subscribers/assets/icon-256x256.png?rev=2274172)
 * [Email Subscribers & Newsletters - Email Marketing, Post Notifications & Newsletter Plugin for WordPress](https://wordpress.org/plugins/email-subscribers/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/email-subscribers/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/email-subscribers/)
 * [Active Topics](https://wordpress.org/support/plugin/email-subscribers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/email-subscribers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/email-subscribers/reviews/)

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)

 * 8 replies
 * 4 participants
 * Last reply from: [gopi_plus](https://wordpress.org/support/users/gopi_plus/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/custom-post-type-86/#post-5334133)
 * Status: resolved