Good evening,
I want to add a meta value to a post when a editor, contributor, or admin enter in the 'write a new post' page.
I try to add this line in wp-admin/post-new.php
'add_post_meta($post_id,'Destiscrib',$autoscrib);'
but the issue is that $post_id==0 because the post isn't yet
I try
'add_action('publish_post', 'ajouter_destiscrib');'
but add_action seems don't work here.
I try do add :
do_action(...) and put action in a other file but how can I retrieve $autoscrib
(and I think it's a complicated way for a little modification)
I need help, please.
Romain.