• Resolved wanqwer

    (@wanqwer)


    This plug-in is awesome! Was searching for something that can make video thumbs for facebook sharing. The only one that works is this one!

    What i did was: i disabled this plugin once, then manualy deleted all thumbnails it had created before from media library, enabled plug-in, tried to “Scan Past Posts” and thumbnails wont come back.
    I tried clearing my caches, reinstaling the plugin again, but nothing works. Scanning posts finds everything as before, but doesnt add thumbs to library.

    Any ideas? ??

    https://www.ads-software.com/extend/plugins/video-thumbnails/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Sutherland Boswell

    (@sutherlandboswell)

    This is happening because the thumbnail URL is saved as a custom field with the post. When deleting the images from the media library, the custom field information is left behind. When scanning past posts, it’s seeing that the custom field already has a URL.

    Here’s what you should try. Open the plugin with the editor and look for this section:

    function video_thumbnails_past_callback() {
    	global $wpdb; // this is how you get access to the database
    
    	$post_id = $_POST['post_id'];
    
    	echo get_the_title($post_id) . ' - ';
    
    	if ( ($video_thumbnail=get_video_thumbnail($post_id)) != null ) {
    		echo '<span style="color:green">?</span> Success!';
    	} else {
    		echo '<span style="color:red">?</span> Couldn\'t find a video thumbnail for this post.';
    	}
    
    	die();
    }

    Now replace it with the code below, which adds in the delete_post_meta line:

    function video_thumbnails_past_callback() {
    	global $wpdb; // this is how you get access to the database
    
    	$post_id = $_POST['post_id'];
    
    	echo get_the_title($post_id) . ' - ';
    
    	delete_post_meta($post_id, '_video_thumbnail');
    
    	if ( ($video_thumbnail=get_video_thumbnail($post_id)) != null ) {
    		echo '<span style="color:green">?</span> Success!';
    	} else {
    		echo '<span style="color:red">?</span> Couldn\'t find a video thumbnail for this post.';
    	}
    
    	die();
    }

    This should clear out the custom field before searching. Remove the line once you’re done so that if you ever need to scan old posts again you won’t be doubling images.

    Thread Starter wanqwer

    (@wanqwer)

    Works! Thank you very much for a quick help!

    While not creating a new thread, i want to ask, if it’s possible to remove the big thumbnail from the post, while leaving the small one in article feed? Also leaving the ability to see the thumb, when sharing the post in facebook.

    Thanks in advance!

    Thread Starter wanqwer

    (@wanqwer)

    I unticked the “Set as Featured Image” tick box. No big featured image is above my video anymore(as i want), but also no thumbnail in facebook share(as i don’t want) ??

    Plugin Author Sutherland Boswell

    (@sutherlandboswell)

    If you edit your theme, you can add a meta tag that notifies Facebook about your image. Put the following somewhere in the <head></head> section:

    <?php if (is_single() && ( $video_thumbnail = get_video_thumbnail() ) != null ) { ?><meta property="og:image" content="<?php echo $video_thumbnail; ?>" /><?php } ?>

    Thread Starter wanqwer

    (@wanqwer)

    You are awesome!
    It works!
    RESOLVED!!! ??

    The plugin is not showing thumbnails for me on one of my sites. I am using the same theme on both and so thats not it. The thumbnails are in my library but do not show on my category pages. I have deleted the plugin reinstalled and tried the above fix none of them worked.
    Any Ideas??

    I had already done that before I posted here. This has not worked for me there are still no thumbnails although they show in the library.
    I deleted all the library thumbnails. Place the above delete line in the proper place. reran the search old posts and it still does not show on my
    Category page

    Plugin Author Sutherland Boswell

    (@sutherlandboswell)

    The thumbnails show on the category page on one of your sites but not the category page of another with the same theme? If they’re in the library and set as the featured image, the plugin is doing everything it can. Try uploading any image and setting it as the featured image, if that image doesn’t appear on the category page then it’s something with the theme.

    Thank you so much for your help. It is an awesome plugin and I’ve got it working on both sites! What I had done is change the content to excerpt in the <div class = “postcontent” in both my Main index template and archives files. I went to your main site and read through the comments. That triggered my memory! I am following an instructor 300 IM, who asked us to do this at one point. As soon as I changed it back to content – it works just as you programmed it ti work.
    You’re right – the plugin is doing everything it can!
    Thanks again Esther

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: Video Thumbnails] Not working after reinstall’ is closed to new replies.