0

I prepared a code, it works when there is a new post, but how do I show users that it is +1 each time a post is made, and if the user clicks on the list of posts, it will be deleted, then it will start counting again: D

add_action("auto-draft_to_publish", "doSomething", 10,1);

function doSomething($post){

 global $post;

 $_SESSION['new_post'] = 'new post 1';
 }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.