Send the post id to a front end edit post form

The post id is sent correctly. What I needed to do was to add the bellow code to the getForm() function, before ob_start(): $post_to_edit = array(); $post_to_edit = get_post( $_POST[‘postid’] ); $this->data[‘item_name’] = $post_to_edit->post_title;

I can’t enqueue Suggest.js in frontend – not added

Provided you’ve confirmed that WP’s native ‘suggest’ script is actually being rendered on the page properly (ie. you’re using the correct template for home vs front-page), sometimes to avoid script conflicts on the page, you need to wrap your script in an anonymous function. So something like: <script> (function($) { $(“#my_input”).suggest(“<?php echo get_bloginfo(‘wpurl’); ?>/wp-admin/admin-ajax.php?action=ajax-tag-search&tax=my_taxonomy”, { … Read more

wp_nonce for Front-End submission form not working

You missed the wp_nonce_field action name. wp_nonce_field(‘submit-users-note”notes_nonce_field’ ); $nonce = $_POST[“notes_nonce_field”]; if ( ! isset($nonce) ! wp_verify_nonce( $nonce, ‘submit-users-note’ ) ) { exit; // Get out of here, the nonce is rotten! }

Getting Custom post category from Form

Its pretty much what you already have, just add the following after $pid = wp_insert_post($new_post);: #categories if( !empty ( $_POST [‘categories’] ) ){ update_post_meta ( $pid, “_testimonials_category”, stripslashes ( $_POST [‘categories’] ) ); } I would probably advise you to change the name of this from categories though to something more relative, like testimonials_categories Then … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)