How to upload and add images to the existing post from the front-end with admin approval which is posted by other user

This is a way to add post images and other things. So put different check on it according to your need. <?php if( ‘POST’ == $_SERVER[‘REQUEST_METHOD’ ] && !empty( $_POST[‘action’ ] ) && $_POST[‘action’ ] == “new_post”) { if (isset ($_POST[‘post_title’])) { $post_title = $_POST[‘post_title’]; } $post = array( ‘post_title’ => $post_title, ‘post_content’ => $post_content, … Read more

media_handle_sideload() fails

The Problem was the @copy() in wp-includes/file.php class of wordpress. This will mask the real problem why the file could not copied (the rights on on htdocs was not ok). So the problem is fixed.

What type to upload image within theme options?

If using image radio buttons, define a directory path here is code. I hope its going work. $imagepath = get_template_directory_uri() . ‘/images/’; $options = array(); $options[] = array( “name” => __(‘Logo’, ‘prothemeus’), “desc” => __(‘Upload your logo’, ‘prothemeus’), “id” => “pt_logo”, “type” => “upload”);

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