• maildigger

    (@maildigger)


    I’m using this code in the header.php to show thumbnails on Facebook:

    <?php if (( $meta_thumbnail = get_video_thumbnail() ) == null ) { $meta_thumbnail = 'https://www.url.com/thumb.png'; } ?><meta property="og:image" content="<?php echo $meta_thumbnail; ?>" />
    [Please post code or markup snippets between backticks or use the code button.]

    On my main page I show the 10 latest posts and I would like to
    show the same thumbnails (width=”200″) from above one my index.php under the title of each post hyperlinked to the permalink of that single post.

    Title post1
    Thumbnail post1 (linked to url post 1)
    Title post2
    Thumbnail post2 (linked to url post 2)
    Etcetera

    How do I do that?

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

Viewing 1 replies (of 1 total)
  • Sutherland Boswell

    (@sutherlandboswell)

    You’ll need Post Thumbnails enabled in your theme (where you’ll set the size) and then you can use the sample code from this page:

    <?php if ( has_post_thumbnail()) : ?>
       <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" >
       <?php the_post_thumbnail(); ?>
       </a>
     <?php endif; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Video Thumbnails] Showing thumbnails on index.php’ is closed to new replies.