Create an instance of add_image_size

When you upload an image, it’s saved, and a copy is created for every image size, resized to the appropriate dimensions. When you specify a set of dimensions manually, e.g. wp_get_attachment_image_src($id, array(57, 57)) the 57×57 dimensions are compared to the image sizes, and the nearest image size is chosen and that image is returned. So … Read more

WordPress featured image url rendering incorrectly when page is loaded causing image to break

I’d recommend taking a look at the database. 1) check the upload_path option and correct directly if needed (well, this one can be altered here too: wp-admin/options.php) SELECT * FROM `wp_options` WHERE `option_name` = ‘upload_path’ 2) check the guid of the attachments and use this plugin if needed SELECT guid,post_mime_type FROM `wp_posts` WHERE `post_type` = … Read more

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

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)