• hey,

    your plugin works really fine, but I have one little problem. I wrote my postings a few hours before publishing on my site. if I pos a video I can generate a thumbnail only after publishing.

    what have I to do, that it saves the video-thumbnail as post-thumbnail?

    my code in the index.php looks like this:

    <div class="post" id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    				<div class="postmetadata3"><?php the_author_posts_link(); ?> | <?php the_time(' d. F Y') ?> <?php edit_post_link('Edit', '', '  '); ?></div><div class="postmetadata1" style="margin-top: -7px;">Eingeordnet in <?php the_category(', ') ?></div><div class="postmetadata1" style="margin-top: -7px; margin-bottom: 5px;"><?php the_tags('Tags: ', ', ', '<br />'); ?></div>
    
    				<div class="entry" style="text-align:justify;">
    	<?php if ( has_post_thumbnail() and !in_category( array( 'fail-compilation' , 'linkschleuder' , 'win-compilation' , 'ohne-worte' , 'musik'  )) )the_post_thumbnail(array( 600,600 ), array( 'class' => 'thumby' )); ?>
    					<?php if( in_category( array( 'fail-compilation' , 'linkschleuder' , 'win-compilation' , 'ohne-worte' , 'musik'  )) ) { the_content(); }
    					else { the_excerpt() ?>
                        <a class="more-link" href="<?php the_permalink() ?>">Weiterlesen</a> <font color="#96100F">&rArr;</font>
    	<?php } ?>
    
    <div class="postmetadata2"><span style="font-weight:normal;"><?php comments_popup_link('Keiner macht sich wichtig &rArr;', '1 macht sich wichtig &rArr;', '% machen sich wichtig &rArr;'); ?></span></div>
    
    				<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
    			</div>

    thanks for helping!!

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

Viewing 1 replies (of 1 total)
  • Sutherland: Adding add_action( 'private_to_publish', 'save_video_thumbnail', 10, 1 ); to row 462 after all the other _to_publish rows works nowadays. Could you incorporate that into 1.8.2?

    Moody1337: If I understood correctly, the problem you have is that thumbnails are not automatically generated for scheduled posts, and you have to generate them manually afterwards by clicking Search Again on the Edit Post screen. Is this the case?

    If, you can try this as a workaround when creating a new post:

    1. Set the post’s visibility to Private.
    2. Click Update (the button that usually is Publish).
    3. In the lower right of the admin screen, in the Video Thumbnail box, click Search Again. The thumbnail is found if there was a video in the post.
    4. Below that, in the Featured Image box, click Set featured image. (This step might not be necessary.)
    5. Set the post’s visibility to Public and change the publication date to the scheduled future date as you normally would. When you now click Publish, the post is in the future publishing queue with the video thumbnail.

    After the suggested update for 1.8.2, steps 3 and 4 shouldn’t be necessary.

    Looking at the plugin’s code, the lines are already in place that should make sure that scheduled posts get their thumbnail correctly at the moment of publication:

    add_action( 'pending_to_publish', 'save_video_thumbnail', 10, 1 );
    add_action( 'future_to_publish', 'save_video_thumbnail', 10, 1 );
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Video Thumbnails] video_thumbnail as post_thumbnail’ is closed to new replies.