How would I got about calling a php file every time someone publishes a new post? August 28, 2022 by Tarik Billa add_action('publish_post', 'call_my_php_file'); function call_my_php_file($post_id){ require_once("path/to/file.php"); }