Extract featured image from link mentioned in blog post

Found some plugins that may (or not) match your requirements. Using this query string in the repository. Super News ( Search Related News ) ShrinkTheWeb (STW) Website Previews Plugin But, there’s one (WP-SnapAvatar) that although doesn’t address the particulars, consists in a little and very interesting function, that I’ll reproduce here: /* Plugin Name: WP-SnapAvatar … Read more

post preview/thumbnails not displaying correctly- linking to “home” instead of post?

It sounds like you need a second loop on your home page to call the 3 most recent posts. Try something like this: // Main home page content here <?php $my_query = new WP_Query( array( ‘posts_per_page’ => 3, ‘nopaging’ => true ) ); while ( $my_query->have_posts() ) : ( $my_query->the_post() ); ?> <div id=”preview”> <div … Read more

show all the posts thumbnails

you can modify or create a simple posts loop with only feature image in there. so you could use something like : <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <div class=”feature-image”> <a href=”https://wordpress.stackexchange.com/questions/55244/<?php the_permalink(); ?>”><?php the_post_thumbnail(); ?></a> </div> <?php endwhile; ?> <?php wp_reset_query(); ?> then your CSS can be: .feature-image … Read more

Add filter on certain thumbnail sizes only

This is a hack, but I guess it should work… add_filter( ‘wp_get_attachment_image_attributes’, ‘wpse8170_add_lazyload_to_attachment_image’, 10, 2 ); function wpse8170_add_lazyload_to_attachment_image( $attr, $attachment ) { //use your image size here with attachment if($attr[‘class’] == ‘attachment-large’){ //do your stuff } return $attr; }

Getting featured image setting as background

There are some mistakes in the code you are using (AFAIK): get_post_thumbnail_id($post->ID, ‘ttrust_post_thumb_big’) only has one parameter, that is post_id. So, it should just be get_post_thumbnail_id($post->ID) ” — there’s no 4th parameter for wp_get_attachment_image_src array( 5600,1000 ) defines the $size of the image you want to be shown. You should be using ‘large’ (string) since … Read more