Adding a new user from the front end
You just need to reorder your function. Create your user before you enter your post, then the ‘post_author’ => $user_id field will actually have a value.
You just need to reorder your function. Create your user before you enter your post, then the ‘post_author’ => $user_id field will actually have a value.
May be you have to check the template, its possibile that it may have: remove_filter(‘the_content’,’wpautop’); or any other function that has to do with the_content and strip_tags usally they are located in theme functions.php
Simply replace wp_delete_post( get_query_var( ‘postid1’), true ); with wp_update_post( array( ‘ID’ => get_query_var( ‘postid1’ ), ‘post_status’ => ‘draft’ ) ); That is assuming that the rest of your logic does already work.
Put this after your if empty $errors and edit to meet your needs: if(empty($errors)) { $subject = __(‘[Your Subject]’, ‘your_text_domain’).’ ‘.$title; $body = __(“Name: “,”your_text_domain”).$booking_name; $body .= __(“\n\nEmail: “,”your_text_domain”).$booking_email; $body .= __(“\n\nPhone: “,”your_text_domain”).$booking_phone; $body .= __(“\n\nMessage: “,”your_text_domain”).$message; $headers = __(‘From: [email protected] ‘, ‘your_text_domain’).’ <‘.$booking_email.’>’ . “\r\n” . __(‘Reply-To: ‘,’your_text_domain’) . $email; // Change this $email … Read more
Frontend Image Upload
Frontend image uploading from frontend cant handle hebrew names
Edit User Profile From Front End
You can stop post revisions using define(‘WP_POST_REVISIONS’, false); in wp-config.php or try below if it works. function save_page() { exit( wp_update_post( array( ‘ID’ => absint( esc_attr( $_POST[‘postID’] ) ), ‘post_type’ =>’your post type’ ‘post_content’ => esc_attr( $_POST[‘content’] ) ) ) ); }
Custom field as Slug
How to make a bilingual front-end post using the plugin WP User Frontend and Polylang or qTranslate?