Fancybox just loading small white square

Use Firebug with Firefox, or use the developer tools in Chrome or Safari or IE to see what’s loading on your site; there’s 404 for a JS file called main.js, probably from Fancybox. Your main jQuery libraries are loading OK.

Control resizing of uploaded images

Why not set your own image sizes from within your theme in functions.php? add_image_size( ‘some-image-size-name’, 500, 300 ); Then you can call that size you want from your template. <?php echo get_the_post_thumbnail( $post_id, $size, $attr ); ?> Links Add image size: http://codex.wordpress.org/Function_Reference/add_image_size get post thumbnail: http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail

How to use getimagesize() of image upload?

In this part: getimagesize($path.”https://wordpress.stackexchange.com/”.$_POST[‘name’]); the variable $path is an array. Try to use getimagesize($path[‘path’].”https://wordpress.stackexchange.com/”.$_POST[‘name’]); instead.

WordPress keeps resizing my 947×947 image down to 500×500 (full-size option)

I figured it out. The hint from user29296 is what led me to this: I had to insert the image using CSS, not html. Check the page now: http://macaulay.cuny.edu/eportfolios/menatwork/test-page/ The code was this: <style type=”text/css”> #image { position:absolute; width:947px !important; height:947px; background-image:url(‘http://macaulay.cuny.edu/eportfolios/menatwork/files/2013/05/test.jpg’); background-repeat:no-repeat; } </style> <div id=”image”></div> Thanks for the replies!

Get Original Dimension Featured Image on the homepage

The second parameter for wp_get_attachment_image_src is $size. $size (string/array) (optional) Size of the image shown for an image attachment: either a string keyword (thumbnail, medium, large or full) or a 2-item array representing width and height in pixels, e.g. array(32,32). As of Version 2.5, this parameter does not affect the size of media icons, which … Read more

Convert featured images into “product images”

That sounds weird because post thumbnails were changed to Featured Images with WP 3.0. I guess you’re talking about some custom field or metabox your framework adds on post edit. You could grab _thumbnail_id which is the key in the wp_postmeta table that stores what you’re looking for. But to me you’d better usewp_get_attachment_img_src: if(has_post_thumbnail($post->ID)) … Read more

Author Avatar as default first image

There was a lotta junk in that function, here’s all you need: function get_post_image() { global $post; if ( preg_match( ‘/<img.+?src=[\'”]([^\'”]+)[\'”].*>/i’, $post->post_content, $matches ) ) $image = $matches[1]; else $image = get_avatar( $post->post_author ); return $image; }

Simple Local Avatar Plugin

The get_avatar function is pluggable, meaning that you can define a function of your own having that name and completely overwrite the default function. If you look at the source for the “Simple Local Avatars” plugin, that is exactly what it has done. get_avatar in your code should be using the function defined by “Simple … Read more