Viewing 12 replies - 16 through 27 (of 27 total)
  • Hi Paul, what’s the easier solution now? Thank you

    Sorry, I see my typo – that should read “there is no easier solution” as fat as I know.

    Can’t the dude that wrote this plug-in do something about this? And share an updated/fixed version of the plug-in?

    i have tried the above steps to try and fix it but with no luck. Has anyone came up with anything that works? I do a lot of writing from my iPad and auto feature image really came in handy with this as the apps i use don’t have a option for featured image! thanks

    Can someone tell me how to change the thumbnail size.

    Thanks,
    Binoy

    Hi Binoy,

    I’m pretty sure that you’ll have to “add_image_size” in your functions.php file for the specific thumbnail name and size that you would like.

    ??

    I am clueless on PHP. What’s the script for that and where do you paste it?

    once you get your thumbnails linked, and showing, as above… there is a simple solution for “attaching” these.

    I place this in my SINGLE.php file, and allow the viewer to attach them for me !
    It works great with past posts, as anytime a page is viewed, like by a robot… it does the magic for me, automatically.

    Once all your images are “attached” you can then delete this code if your plugins attach correctly for you. Or you can leave it, as it only acts upon checking to see if attachment is not correct before doing anything.

    if (has_post_thumbnail( $post->ID ) ) {
    
    $theid = get_post_thumbnail_id( $post->ID );
    $image = wp_get_attachment_image_src( $theid  , 'single-post-thumbnail' );
    $attached = get_post($theid)->post_parent;
    
       if ($attached = 0 ) {
    
    $thumbnailURL = $image[0];
    $newstring = strstr ($thumbnailURL, "20") ;
    delete_post_meta($theid, '_wp_attached_file');
    add_post_meta($theid, '_wp_attached_file', $newstring, true); 
    
    // Update post parent info, and sets the title of media to your post title
      $my_post = array();
      $my_post['ID'] = $theid;
      $my_post['post_parent'] = $post->ID;
    $my_post['post_title'] = get_the_title($post->ID);
    
    // Update the post into the database
      wp_update_post( $my_post );
    // echo the action, for checking.
    echo ' NOT ATTACHED, will attach now ->image: ' . $theid . '  url:' . $image[0] . '  post: ' . $post->ID ;
        }
    }

    once you get your thumbnails linked, and showing, as above… there is a simple solution for “attaching” these.

    I place this in my SINGLE.php file, and allow the viewer to attach them for me !
    It works great with past posts, as anytime a page is viewed, like by a robot… it does the magic for me, automatically.

    Once all your images are “attached” you can then delete this code if your plugins attach correctly for you. Or you can leave it, as it only acts upon checking to see if attachment is not correct before doing anything.

    if (has_post_thumbnail( $post->ID ) ) {
    
    $theid = get_post_thumbnail_id( $post->ID );
    $image = wp_get_attachment_image_src( $theid  , 'single-post-thumbnail' );
    $attached = get_post($theid)->post_parent;
    
       if ($attached = 0 ) {
    
    $thumbnailURL = $image[0];
    $newstring = strstr ($thumbnailURL, "20") ;
    delete_post_meta($theid, '_wp_attached_file');
    add_post_meta($theid, '_wp_attached_file', $newstring, true); 
    
    // Update post parent info, and sets the title of media to your post title
      $my_post = array();
      $my_post['ID'] = $theid;
      $my_post['post_parent'] = $post->ID;
    $my_post['post_title'] = get_the_title($post->ID);
    
    // Update the post into the database
      wp_update_post( $my_post );
    // echo the action, for checking.
    echo ' NOT ATTACHED, will attach now ->image: ' . $theid . '  url:' . $image[0] . '  post: ' . $post->ID ;
        }
    }

    @vincej is there any downside to this? I don’t know squat about php and I really want to use your code. I just upgrade a very old theme I’ve been using for three years and have more than 1,200 posts I want to attached featured images to.

    Guess I’m looking for reassurance. Can I get a hug? ??

    Here’s the site. It’s using the latest version of both WordPress and the theme, but the theme hasn’t been updated for two years and I’ve gotten my grubby hands on it to shove it around to do what I wanted to accomplish.

    https://www.words4it.com

    Hi,

    I can’t activate the plugin after the bugfix:

    Parse error: syntax error, unexpected ‘}’ in /home/www/doc/7964/testspiel.de/www/wp-content/plugins/auto-featured-image/auto-featured-image.php on line 353

    Cheers
    Marc

    Okay, this is another bug. I fixed it. ??

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘[Plugin: Auto Featured Image] Thumbnails not showing after upgrade to 3.4’ is closed to new replies.