I am reposting. As my last questions wasn’t famous.
My users are submitting custom post types (projects) from the frontend. How do I display notices (such as the one displayed on admin board) to the front end for when the user performs an action, example edit a post.
I know there are hooks for update/submit (post_updated_messages…) but those do not display anything on the frontend.
I tried putting the following but it doesn’t work:
add_filter('post_updated','alert_user');
function alert_user()
{
add_action('display_message','prepare_text');
}
function prepare_text(){
return 'You did it!';
}
in my theme I have
do_action('display_message');
It doesn’t work as prepare_text is never hooked to display_message!
Any help?
Thanks
You could filter
the_content
: