Echo URL of large version of Featured Image

Use the second parameter of wp_get_attachment_image_src(): $size. $att = wp_get_attachment_image_src( $att_ID, ‘large-thumb’ ); or $att = wp_get_attachment_image_src( $att_ID, array ( 900, 300 ) ); The size is passed to image_downsize() and there to image_get_intermediate_size(). If $size is an array WordPress will search for the best match in existing images: // from wp-includes/media.php::image_get_intermediate_size() // get the … Read more

Adding width and height to wp_get_attachment_image_src

What is ‘two’ referring to? Is that a custom image size? Place the following var_dump(‘<pre>’,$image,'</pre>’); after your declared $image variable like so, $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘two’ ); var_dump(‘<pre>’,$image,'</pre>’); and provide the results so we can inspect the output. As per Codex the second argument in this function, wp_get_attachment_image_src( $attachment_id, $size, $icon ); … Read more

Auto resize images after adding a new size

WordPress doesn’t regenerate the newly registered size, only applies it to future uploads. You’ll have to use something like the Regenerate Thumbnails plugin or one of the similar ones available at WordPress.org.

function to show only featured image of the posts

I am not sure that a filter on the_content is the way to go here. If I understand you, I think that all you need is something like the following your theme– cribbed from the two Codex pages listed below and altered slightly. if ( has_post_thumbnail() ) { // check if the post has a … Read more

Image popup in a lightbox / overlay from the backend 3.5 admin area (plugin)

You can just use the built in ThickBox. Maybe not the pretties library but it does its job. Just add the class thickbox to the link and add the image to the href Here is a simple example: <?php echo ‘<a href=”https://wordpress.stackexchange.com/questions/78749/image.png” class=”thickbox”>’. __(‘Test image’, ‘domain’) .'</a>’; ?> Read more about ThickBox here.