Using catch_the_image to get the thumbnail size

You can add your own named image size by adding code to your functions.php. Something in the line of add_theme_support(‘post-thumbnails’);//might not be necessary add_image_size(‘front-end-150’, 300, 300); Now you should be able to use in your catch_that_image() wp_get_attachment_image($post->ID, ‘front-end-150′) for all newly uploaded images. Your past images don’t have the front-end-150, so you might want to … Read more

Woocommerce: Set thumbnail detail (clipping area)

You can fix this using the following code snippet from Brian Krogsard, that I modified. This code should preferably be placed into the functions.php file of your child theme. Instead of taking the original 150×150 thumb it now takes the correct, cropped 150×150 thumb. /* This snippet removes the action that inserts thumbnails to products … Read more

Can’t edit images

I solved the problem: it was bad formatting of functions.php file – UTF-8. When i turned it to UTF-8 without BOM my problem just disappear.

Auto-crop width, not height

WordPress cant do it alone. You need a script called Timthumb.php to do it. This is really simple to use. Check it out: https://code.google.com/p/timthumb/ And the best: wordpress will not store multiple versions of your images when crop. It will be done by the script on demand.

Disable image rename on upload

The renaming to test1.jpg is not due to any cropping / resizing functions WordPress. This is because you already had a file named test.jpg uploaded, and WordPress does not replace files if one exists in the folder that has the same name. If, for some reason you want it to replace files rather than rename … Read more

Thumbnail generating and posting

How image gets cropped depends on how the respective size was defined with add_image_size(). In the past it was limited to soft or hard crop modes, always respective to the center of image. Now you can also pass more elaborate directions for the crop, such as array( ‘left’, ‘top’ ). See the linked documentation for … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)