add_action('cred_save_data', 'func_change_post_status',10,2);
function func_change_post_status($post_id, $form_data) {
if ($form_data['id']==625){
$my_post['ID'] = $post_id;
$my_post['post_status'] = $_REQUEST['post_status'];
// Update the post into the database
wp_update_post( $my_post );
}
}
Can you please share the URL where I can see the form as well as access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
I've added the Post Status Generic Radio button field at the bottom of the form which you can see:
=> hidden link
Then, I just activated the code snippet you added to "Custom Code" section for the snippet "post_status_issue" and I can see when I select draft and save the post and check in backend, the post becomes draft and when I publish it, the post status changed to publish.
Opps there is still one more issue
1. As one Add A New Business via Front end From post goes to Draft for review.
2. So use on front end cannot see the post in view as it is not published so need help here as well as want to show in view all post for login user either Publish or saved as Draft.
3. If A use change the status to from Draft to Publish or Publish to Draft for guest User "View should show only Publish Post"
4. Please don't make any changes in this 1st do suggest me.
Thanks.
5. I have created a post with test that can be use as test case.
New threads created by Jamal and linked to this one are listed below:
Secondly if you check on home page in view you can see there is change now for publish or for draft even new post are not being published I we try to publish them
Minesh is on vacation for a couple of days. If you don't mind, I'll continue with you on this request.
However, for support rules, we are able to handle only one issue at a time. This helps us to bring you a better service and also helps other users to find all the information here exposed. For that reason, I have created a new ticket to handle your last question. I'll be posting my reply there.