Firstly I don’t see $args
assigned anywhere.
Secondly before displaying in front-end, check if post is created with your values.
Little debugging like printing $new_post
before insert might give you your issue.
Firstly I don’t see $args
assigned anywhere.
Secondly before displaying in front-end, check if post is created with your values.
Little debugging like printing $new_post
before insert might give you your issue.