Get thumbnail URL :)

You are not using set_post_thumbnail_size properly. Try with: add_image_size( ’emphasis’, 132, 82, true );

A little confused as to what add image size actually does

Your not specifying a $crop value so your images are being cropped using a soft proportional crop. Set crop to TRUE for a hard crop. add_image_size( ‘sidebar_thumb’, 46, 60, TRUE); *no need to call function_exists for add_theme_support or add_image_size unless you want to be backwards compatible to pre 2.9.

Convert attachment ID into url?

You need the function wp_get_attachment_image_src() see http://codex.wordpress.org/Function_Reference/wp_get_attachment_image_src In your code it would be something like: <?php foreach(get_field(‘connections’) as $relationship): ?> <?php $img = wp_get_attachment_image_src( get_post_meta($relationship->ID, ‘company_logo’, true ), ‘thumbnail’ ); ?> <img src=”https://wordpress.stackexchange.com/questions/40232/<?php echo $img[0]; ?>” width=”<?php echo $image_attributes[1]; ?>” height=”<?php echo $image_attributes[2]; ?>” /> <a href=”<?php echo get_permalink($relationship->ID); ?>”><?php echo get_the_title($relationship->ID) ?></a> <br /> … Read more

Clicks registering on Preview DNS site

It appears that you have content (pages, posts or widgets) that contain old URL information. An example of a URL that is correct: http://www.hutchisonhaines.co.uk/wp-content/themes/FactoryWP/style.css An example of a URL that is incorrect: http://hutchisonhaines.co.uk.previewdns.com/wp-content/uploads/2012/02/flowers-944×290.jpg The quickest way to fix this problem would be to do a database dump and then run a search and replace program … Read more

Post Gallery list attachments except the one used as post thumbnail

You can use the exclude parameter. global $post; $args = array( ‘exclude’ => get_post_thumbnail_id( $post->ID ) ‘post_type’ => ‘attachment’, ‘post_mime_type’ => ‘image’, ‘numberposts’ => -1, ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’, ‘post_parent’ => $post->ID ); $images = get_posts($args); http://codex.wordpress.org/Template_Tags/get_posts http://codex.wordpress.org/Function_Reference/get_post_thumbnail_id

Resizing thumbnails retrospectively

I never had much luck with that AJAX plugin either, but ViperBond’s Regenerate Thumbnails works perfectly for me on a number of sites: viper007bond.com/wordpress-plugins/regenerate-thumbnails It manages several thousand images on my server, albeit somewhat slowly, although you can also run it on individual images or batches of images from the Media library. If you have … Read more

How to hide image-url if no attachment?

Assuming you’re following this tutorial: http://wp.tutsplus.com/tutorials/automagic-post-thumbnails-image-management/ Replace the echo statement at the end of get_attachment_picture with a return, then change your image code. Here is your new image code: // get the URL of the image $src = get_attachment_picture(); // if the url is not empty, display the image if(!empty($src)){ ?> <img src=”https://wordpress.stackexchange.com/questions/48896/<?php echo $src; … Read more