Timeline for a tricky question about featured image
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 6, 2016 at 21:06 | history | edited | I.Alex | CC BY-SA 3.0 |
added 9611 characters in body
|
Mar 6, 2016 at 19:05 | comment | added | I.Alex | i try to take something from user subbmit post plugin and didin't work . that plugin works from front end and he get the feature image. | |
Mar 6, 2016 at 19:02 | comment | added | I.Alex | ok , sorry i'm new on this site , next time i will know. | |
Mar 6, 2016 at 19:01 | comment | added | Tom J Nowell♦ | Also, this isn't a forum thread, any replies should be comments, not answers | |
Mar 6, 2016 at 19:00 | comment | added | Tom J Nowell♦ | File inputs are handled differently to text inputs, this is an XY question, your actual problem is "How do I implement a file uploader in WordPress?" , and you should make that clear in your question | |
Mar 6, 2016 at 18:56 | comment | added | I.Alex | well the front end was with external link and upload file and i remove the external link and leave just to upload. this html : <input type="file" name="image_imagepost" /> upload file and this is the code for him --- textuploader.com/5vphb | |
Mar 6, 2016 at 18:49 | comment | added | Tom J Nowell♦ | Your code appears to download a file from a URL and attach it, but your form contains a file upload input, it doesn't make a lot of sense, you need to reverse course and find out how a frontend upload works, as you've put a frontend uploader in your template, then hooked it up to a remote image downloader rather than handling the upload | |
Mar 6, 2016 at 18:48 | comment | added | I.Alex | thanks for the quick response Yobd Digital but it didin't work , i mean is the same , the image goes on costum field .. and nothing change.. I think is something from here? // Add the file to the media library and generate thumbnail. $attach_id = wp_insert_attachment( $attachment, trailingslashit($uploaddir['url']) . $filename, $post_id ); $attach_data = wp_generate_attachment_metadata( $attach_id, trailingslashit($uploaddir['path']) . $filename ); wp_update_attachment_metadata( $attach_id, $attach_data ); set_post_thumbnail($post_id, $attach_id); } } } else { if($_FILES['image_imagepost']['er | |
Mar 6, 2016 at 18:25 | answer | added | thebigtine | timeline score: 1 | |
Mar 6, 2016 at 18:17 | review | First posts | |||
Mar 7, 2016 at 3:24 | |||||
Mar 6, 2016 at 18:16 | history | asked | I.Alex | CC BY-SA 3.0 |