Call featured image url

the_post_thumbnail() is highest level function for it, which will output complete HTML. If you need some lower level parts, digging deeper are nested: get_the_post_thumbnail() wp_get_attachment_image() wp_get_attachment_image_src()

Unrestricted height thumbnails

According to add_image_size() you can do something like that with width but I imagine it works the same with height: $width (int) (optional) The post thumbnail width in pixels. Set to 9999 to resize based on $height Default: 0 Really I think you would want to set it to something ridiculously high which 9999 should … Read more

Run javascript upon successfully set featured image

You could use .ajaxComplete, as mentioned by @onetrickpony in https://wordpress.stackexchange.com/a/36597/57034, except do it globally on document, as mentioned in http://api.jquery.com/ajaxcomplete/, then filter based on action: add_action( ‘admin_print_footer_scripts’, function () { ?> <script type=”text/javascript”> jQuery(function ($) { $(document).ajaxComplete(function (event, xhr, settings) { var match; if (typeof settings.data === ‘string’ && /action=set-post-thumbnail/.test(settings.data) && xhr.responseJSON && typeof xhr.responseJSON.data … Read more

WordPress get post thumbnail url

Initially, I saw the double and single quotes all jumbled up. This did fix some of what I saw, but I finally had time to test the code you put up. First step, I used var_dump on $recent_posts to make sure I was getting the usable values. Next, I echoed each variable as it was … Read more

How risize a thumbnail?

You should define add_image_size with fourth parameter to allow WordPress to crop your image to exact size. add_image_size ( ‘single_post’, 500, 200, true); Whether to crop images to specified height and width or resize Difference between soft and hard crop false – Soft proportional crop mode. true – Hard crop mode. array – Specify positioning … Read more