Fetching full size featured image to insert in RSS Feed
Fetching full size featured image to insert in RSS Feed
Fetching full size featured image to insert in RSS Feed
problem with blank page
Ok, here is how the thumbnail url should be called: <header <?php if ( has_post_thumbnail($currentpageid) ) { ?> style=”background-image: url(<?php echo $page_thumb[‘0’];?>)”<?php }?>></header>
Worse thumbnail quality after GD library install
It seems it was a theme error. As per Oblaksoft, it assumes that all images reside on the server’s file system and doesn’t work with images in the cloud. It’s hard when a theme is not fully compatible with WordPress hosted under Amazon EC2. =(
the_post_thumbnail echoes its value, which doesn’t work in variable assignment. Use get_the_post_thumbnail instead. Most WordPress API functions follow this pattern, there are typically two versions – one which will echo the result and another with get_ prepended which will return the result.
get the post thumbnail returns the full size
Looks like a simple typo: $p[‘thumbnail_id]’]; should be: $p[‘thumbnail_id’];
You’re trying to display the post thumbnail for the attachment itself: wp_get_attachment_url( get_post_thumbnail_id( 3400 ) ) Instead, use: wp_get_attachment_url( get_post_thumbnail_id( 2300 ) )
As you don’t have much programming experience, I’ll post a ready-to-use solution here. I’ve looked at your code a little longer, and the problem is that after array_shift, $ids is still an array. set_post_thumbnail expects and integer, not an array. You could use $ids[0] as the second parameter, but the following is a cleaner solution, … Read more