Title: Scheduled posts + Specific category
Last modified: June 4, 2021

---

# Scheduled posts + Specific category

 *  Resolved [rytor](https://wordpress.org/support/users/rytor/)
 * (@rytor)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/scheduled-posts-specific-category/)
 * Hi there! I am facing an issue I can’t solve. We want the users to make scheduled
   posts (wordpress editor) and if the posts belong to a certain category then send
   a notification. We made this change (where categoryname is the slug of the category)
 * File: onesignal-admin.php
 * if ($posted_from_wordpress_editor) {
 * $do_send_notification = ($was_posted && $onesignal_meta_box_send_notification_checked&&
   in_category(‘categoryname’)) ||
    (!$was_posted && $post_metadata_was_send_notification_checked&&
   in_category(‘categoryname’));
 * It doesn’t work. If someone publishes a normal post from the specified category(
   and only from the specified category) it will send the notification. If the post
   is scheduled, the post will be published on the specified date and time but the
   notification will never leave unsless someone edits the post and presses update.
   The original code works for the scheduled posts. Any suggestions?
 * Thank you in advance
    -  This topic was modified 4 years, 11 months ago by [rytor](https://wordpress.org/support/users/rytor/).
    -  This topic was modified 4 years, 11 months ago by [rytor](https://wordpress.org/support/users/rytor/).
    -  This topic was modified 4 years, 11 months ago by [rytor](https://wordpress.org/support/users/rytor/).
    -  This topic was modified 4 years, 11 months ago by [rytor](https://wordpress.org/support/users/rytor/).
    -  This topic was modified 4 years, 11 months ago by [rytor](https://wordpress.org/support/users/rytor/).
    -  This topic was modified 4 years, 11 months ago by [rytor](https://wordpress.org/support/users/rytor/).
    -  This topic was modified 4 years, 11 months ago by [rytor](https://wordpress.org/support/users/rytor/).

Viewing 1 replies (of 1 total)

 *  Plugin Author [OneSignal Push Notifications](https://wordpress.org/support/users/onesignal/)
 * (@onesignal)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/scheduled-posts-specific-category/#post-14829753)
 * Hello
 * Sorry for the delay, please contact [support@onesignal.com](https://wordpress.org/support/topic/scheduled-posts-specific-category/support@onesignal.com?output_format=md)
   for faster support.
 * You will likely need to add the send_after property to your API request and set
   the date as the time the post will be published, that will schedule the notification
   on our backend instead of relying on the wordpress queue to trigger it.
 * You can use the onesignal_send_notification filter: [https://documentation.onesignal.com/docs/web-push-wordpress-faq#onesignal_send_notification-filter](https://documentation.onesignal.com/docs/web-push-wordpress-faq#onesignal_send_notification-filter)
 * And details for the send_after parameter are here: [https://documentation.onesignal.com/reference/create-notification#delivery](https://documentation.onesignal.com/reference/create-notification#delivery)
 * Please use [support@onesignal.com](https://wordpress.org/support/topic/scheduled-posts-specific-category/support@onesignal.com?output_format=md)
   for faster support and speaking with our support team directly.

Viewing 1 replies (of 1 total)

The topic ‘Scheduled posts + Specific category’ is closed to new replies.

 * ![](https://ps.w.org/onesignal-free-web-push-notifications/assets/icon.svg?rev
   =3003897)
 * [OneSignal - Web Push Notifications](https://wordpress.org/plugins/onesignal-free-web-push-notifications/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/onesignal-free-web-push-notifications/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/)
 * [Active Topics](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/onesignal-free-web-push-notifications/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [OneSignal Push Notifications](https://wordpress.org/support/users/onesignal/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/scheduled-posts-specific-category/#post-14829753)
 * Status: resolved