Title: Post added trigger
Last modified: October 14, 2021

---

# Post added trigger

 *  Resolved [Nicholas Turbanov](https://wordpress.org/support/users/ntd/)
 * (@ntd)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/post-added-trigger/)
 * Hi,
 * What exactly is supposed to trigger the Post added (to database) trigger?
 * I can’t get it to fire using `wp_insert_post()` on a clean WP 5.8.1 installation
   with not other plugins active and Twenty Twenty-One as the theme.
 * No email is being sent and nothing shows up in the plugins debug logs.
 * My actual use case is a bit different, but I can’t get even this vanilla setup
   to work.
 * Thanks!

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

 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/post-added-trigger/#post-14972546)
 * Hi Nicholas,
 * that would be exactly the case it should cover and `wp_insert_post()` should 
   trigger the Post added notification.
 * Let me try to reproduce this on the new 8.0.0 version which should be released
   within a week. If I discover the issue I’ll patch it before the release.
 * If it will work that means you may execute that function too early before our
   plugin initializes. In the v7 that should be later than `init 1000`. v8 won’t
   have that issue.
 *  Thread Starter [Nicholas Turbanov](https://wordpress.org/support/users/ntd/)
 * (@ntd)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/post-added-trigger/#post-14972567)
 * Hi Kuba,
 * I’m actually just running it, for testing purposes, in the footer front-end template
   of the theme.
 * The Post draft trigger works fine, the add one doesn’t.
 * Thank you!
 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/post-added-trigger/#post-14972594)
 * That’s definitely not the timing issue, then! I’m on it.
 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/post-added-trigger/#post-14972783)
 * Ok, I tried to replicate this issue and I couldn’t.
 * I’ve set up a notification with the `Post added` trigger and in `footer.php` 
   of the Twenty Twenty theme I added:
 *     ```
       wp_insert_post( [
       	'post_title'   => 'Front',
       	'post_content' => 'Content',
       ] );
       ```
   
 * and that triggered it successfully.
 * There’s a chance new version of the plugin will solve that issue as I was testing
   the dev build from [this branch](https://github.com/BracketSpace/Notification/tree/release/8.0.0).
 *  Thread Starter [Nicholas Turbanov](https://wordpress.org/support/users/ntd/)
 * (@ntd)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/post-added-trigger/#post-14974585)
 * Yes indeed, the 8.0 release branch works. Perfect, I’ll wait for the release.
 * Thank you, awesome support!
 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/post-added-trigger/#post-14976860)
 * Awesome!!
 * If you could spare 1 minute to [write a review](https://wordpress.org/support/plugin/notification/reviews/#new-post)
   it would be much appreciated 🙂

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

The topic ‘Post added trigger’ is closed to new replies.

 * ![](https://ps.w.org/notification/assets/icon-256x256.gif?rev=3476901)
 * [Notification - Custom Notifications and Alerts for WordPress](https://wordpress.org/plugins/notification/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/notification/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/notification/)
 * [Active Topics](https://wordpress.org/support/plugin/notification/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/notification/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/notification/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/post-added-trigger/#post-14976860)
 * Status: resolved