WordPress.org

Ready to get started?Download WordPress

Forums

WP User Frontend
[resolved] Can't make work featured image on wordpress 3.5 (2 posts)

  1. lunaticalm
    Member
    Posted 1 year ago #

    Hi!
    I updated wordpress to version 3.5 and one of functions not working anymore.

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

    plugin 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
    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 ?

    http://wordpress.org/extend/plugins/wp-user-frontend/

  2. lunaticalm
    Member
    Posted 1 year ago #

    i found temporary solutionis to set post to draft

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.