How to add media from front-end to an existing post and edit file title

First add to your for the new input field: <form id=”file-form” enctype=”multipart/form-data” action=”<?php echo $_SERVER[‘REQUEST_URI’]; ?>” method=”POST”> <p id=”async-upload-wrap”> <label for=”async-upload”>upload</label> <input type=”file” id=”async-upload” name=”async-upload”> <input type=”submit” value=”Upload” name=”html-upload”> </p> <p id=”image_title”> <label for=”image_title”>Image Title</label> <input type=”text” id=”image_title” name=”image_title” value=””> </p> <p> <input type=”hidden” name=”post_id” id=”post_id” value=”<?php echo $post_id ?>” /> <?php wp_nonce_field(‘client-file-upload’); ?> <input … Read more

WordPress wp_editor to post and edit

I’m assuming you would have an Edit page and an Add New page, so why not just switch out the wp_insert_post function from the Add New page to wp_update_post? The first argument for wp_editor is the content you want to appear, so just use the current post that’s being edited’s content.

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