Is there Anyway to trigger a link once new post is Publish ?. My goal is to use it to ping sitemap
http://google.com/ping?sitemap=http://www.example.com/my_sitemap.xml
I simply don't want to set cron job for this. Please Gurus in the house is there anyway I can use theme function to achieve this ? I am new to wp coding Please.
From the Wordpress Plugin API:
So in your theme's
functions.php
, write your function to call the google url, then use theadd_action
function, withpublish_post
as the hook, and your function's name as the callback.