Title: CPT also includes normal posts too
Last modified: February 22, 2021

---

# CPT also includes normal posts too

 *  Resolved [Andi Lee Davis](https://wordpress.org/support/users/andi-lee-davis/)
 * (@andi-lee-davis)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/cpt-also-includes-normal-posts-too/)
 * hi,
 * firstly hope you are safe and well.
    I installed your plugin and all looks good.
   However one MAJOR FLAW…
 * I have 2 custom post types, one for our blog and one for our newsletter.
    Our
   posts are used for our tracks/videos. So I deleted the campaign notifications
   for normal posts and set up only two that would mail out when a new blog entry
   or newsletter is created.
 * However when a video post is created it automatically schedules those as well
   and uses the templates I created for the custom post types.
 * Video/Music tracks are uploaded by our artists all the time, so last night approximately
   9 communications were sent out to a great deal of our community erroneously.
 * This should not happen, in this scenario normal POSTS should be excluded, as 
   would otherwise spam our members. Again this is a major flaw.
 * We cannot go PRO with your plugin until this is fixed.
 * I will be looking into the code of the plugin to find out how it is selecting
   and filtering the posts to see if I can help you resolve this issue.
 * Thanks
 * Andi
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcpt-also-includes-normal-posts-too%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [Andi Lee Davis](https://wordpress.org/support/users/andi-lee-davis/)
 * (@andi-lee-davis)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/cpt-also-includes-normal-posts-too/#post-14084693)
 * I think the issue is in this line:
 * /lite/includes/db/class-es-db-campaigns.php
    Lines 686,687
 *     ```
       $post_type = ES_Common::prepare_custom_post_type_string( $post_type );
       				$where    .= " and categories LIKE '%" . wp_specialchars_decode( addslashes( $post_type ) ) . "%'";
       ```
   
 * Should it not be where posts->post_type = xyz
    As this is about getting the post
   by post_type not by category?
 *  Thread Starter [Andi Lee Davis](https://wordpress.org/support/users/andi-lee-davis/)
 * (@andi-lee-davis)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/cpt-also-includes-normal-posts-too/#post-14084738)
 * Or in
 * /email-subscribers/lite/includes/libraries/action-scheduler/classes/data-stores/
   ActionScheduler_wpPostStore.php
 * protected function create_post_array( ActionScheduler_Action $action, DateTime
   $scheduled_date = NULL ) {
    $post = array( ‘post_type’ => self::POST_TYPE, ‘post_title’
   => $action->get_hook(), ‘post_content’ => json_encode($action->get_args()), ‘
   post_status’ => ( $action->is_finished() ? ‘publish’ : ‘pending’ ), ‘post_date_gmt’
   => $this->get_scheduled_date_string( $action, $scheduled_date ), ‘post_date’ 
   => $this->get_scheduled_date_string_local( $action, $scheduled_date ), ); return
   $post; }`
 * `
 * There does not seem to be any filter for the POST TYPE, The self::POST_TYPE is
   set to
    const POST_TYPE = ‘scheduled-action’; presumably this gets set before
   the method is accessed?
 *  Plugin Contributor [Kishan Ranawat](https://wordpress.org/support/users/kishanranawat/)
 * (@kishanranawat)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/cpt-also-includes-normal-posts-too/#post-14091252)
 * Hi [@andi-lee-davis](https://wordpress.org/support/users/andi-lee-davis/),
 * We have already replied to your queries in our support channel.
 * Closing this ticket for now. Feel free to reopen it if the issue persists after
   this.
 * Thank You!
 *  Plugin Contributor [Kishan Ranawat](https://wordpress.org/support/users/kishanranawat/)
 * (@kishanranawat)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/cpt-also-includes-normal-posts-too/#post-14110174)
 * Hi [@andi-lee-davis](https://wordpress.org/support/users/andi-lee-davis/),
 * We have released a new version(**4.6.11**) of the Email Subscribers plugin with
   an option to disable the post notification for normal WordPress posts.
 * You can use the new ‘**None**‘ option in the ‘**Select post category**‘ section
   to achieve that if required. This does not affect other custom post types.
 * Thank you.

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

The topic ‘CPT also includes normal posts too’ 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

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

 * 4 replies
 * 2 participants
 * Last reply from: [Kishan Ranawat](https://wordpress.org/support/users/kishanranawat/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/cpt-also-includes-normal-posts-too/#post-14110174)
 * Status: resolved