Hight relosution post image
-
For thumbnails, I found
wp_get_attachment_image_url
does not return high resolution thumbnails. I replaced it withget_the_post_thumbnail
.I am wondering if we can make the
get_the_post_thumbnail
as default so I can update this plugin without having to modify it later?Or is there a way to add a hook to replace the thumbnail anchor link?
I have 2 examples:
Before (blocks/Post_Grid_4.php at line 2086):
$post_loop .= '<a href="'.$titlelink.'"><img alt="'.$title.'" src="'.wp_get_attachment_image_url( $post_thumb_id, 'full' ).'" /></a>';
After:
$post_loop .= '<a href="'.$titlelink.'">'.get_the_post_thumbnail().'</a>';
We need to change it for each post type, for example: blocks/Post_List_3.php
vim ultimate-post/blocks/Post_List_3.php + 2289
after: $post_loop .= ‘‘.get_the_post_thumbnail().’‘;
- The topic ‘Hight relosution post image’ is closed to new replies.