• Resolved lunaticalm

    (@lunaticalm)


    Hi!
    I updated wordpress to version 3.5 and one of my functions not working anymore.
    I have a page with post form from frontend where users can submit posts to one category.

    After the upgrade to 3.5 i can create post fine and upload image too in the media lubrary but , the function that i use to attach the uploaded image like featured image to the post not working for some reason that i can’t fnd why.

    i use this code to set featured image after the post is sucessful created and the image is uploaded to the media library.I can capture the $post_id and the $attach_id
    wpuf_set_post_thumbnail( $post_id, $attach_id );

    I made change to the code too but without luck
    add_post_meta( $post_id, '_thumbnail_id', $attach_id,true );

    i I manualy ad post_meta to the post in the database the image is apearing as featured fine but i must set the “_edit_lock” first.
    when i ad this code the _edit_lock is inserted in the post_meta but not the “_thumbnail_id”

    add_post_meta( $post_id, '_thumbnail_id', $attach_id,true );
           add_post_meta( $post_id, '_edit_lock', time().':1',true);
    
    in wordpress 3.5 is any restrictions about "_thumbnail_id" post_meta execution from fronted ?

    Any help to acomplish this please?
    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Set featured Image from frontend after post’ is closed to new replies.