Title: edobejar's Replies | WordPress.org

---

# edobejar

  [  ](https://wordpress.org/support/users/edobejar/)

 *   [Profile](https://wordpress.org/support/users/edobejar/)
 *   [Topics Started](https://wordpress.org/support/users/edobejar/topics/)
 *   [Replies Created](https://wordpress.org/support/users/edobejar/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/edobejar/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/edobejar/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/edobejar/engagements/)
 *   [Favorites](https://wordpress.org/support/users/edobejar/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Weird add_action wp_insert_post](https://wordpress.org/support/topic/weird-add_actionwp_insert_post/)
 *  Thread Starter [edobejar](https://wordpress.org/support/users/edobejar/)
 * (@edobejar)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/weird-add_actionwp_insert_post/#post-1999590)
 * For the record, I fixed this. I found that add_action was actually being triggered
   with publish_post and the problem was using other functions outside the wordpress
   loop that were not getting the data they were supposed to get.
 * Thanks.
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Weird add_action wp_insert_post](https://wordpress.org/support/topic/weird-add_actionwp_insert_post/)
 *  Thread Starter [edobejar](https://wordpress.org/support/users/edobejar/)
 * (@edobejar)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/weird-add_actionwp_insert_post/#post-1999519)
 * Here’s additional info regarding this problem:
 * – Template uses wp_insert_post($post) to publish each new post.
    – The plugin
   I created uses add_action(‘publish_post’,’function_name’) as hook. – Plugin should
   work each time a new post is published from the template, but it’s not working.
   Though, if I publish a new post from the admin, it works. – I also tested add_action(‘
   wp_insert_post’,’function_name’) with the same result.
 * Any other action hook I should try to make the plugin work?
 * Thanks
 *   Forum: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
   
   In reply to: [Weird add_action wp_insert_post](https://wordpress.org/support/topic/weird-add_actionwp_insert_post/)
 *  Thread Starter [edobejar](https://wordpress.org/support/users/edobejar/)
 * (@edobejar)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/weird-add_actionwp_insert_post/#post-1999506)
 * Hi, thank you for replying. Yes, when using publish_post I tried also posting
   from the template, that is outside the admin and plugin isn’t triggered.

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