I want to write a plugin that does something when a new post is made.
Is there a way to have this plugin detect when a new post is made and then run some function?
Please let me know if anyone knows!
Thanks.
I want to write a plugin that does something when a new post is made.
Is there a way to have this plugin detect when a new post is made and then run some function?
Please let me know if anyone knows!
Thanks.
thanks whooami!
this was a great help.
just a quick question.
I have a function that gets passed the post_id. So I want to get 2 things, the content and the category.
I use:
$usepostid = get_post($post_ID);
$sendcontent = $usepostid->post_content;
to get the content - but i saw that post_category doesn't work anymore. It says to use get_post_category() - but only within the loop. How can I get the post category ID outside the loop ?
Thanks!
i tried get_the_category() and it worked fine, even outside the Loop
This topic has been closed to new replies.