Latest Updates » [1] Auto XML Sitemap [2] Create Contact Page [3] Blogger and Wordpress Templates! Download Now !


Sunday, 30 June 2013

WPSNIPPET:Crop images instead of scaling in wordpress



crop images wordpress trick
Wordpress no doubt is best blogging software in world. Millions of bloggers in world use wordpress today for their blogs. The best part of wordpress is you can easily customize your blog design and layouts. Small and simple snippets can help you in this customizations. To implement these snippets in blog is very easy. Most of snippets are just to copy and past into blog theme files and save.

WordPress trick: If you would like to crop the images instead of scaling them then this simple but powerful snippet can help you to do this. Just read on..


Step 1. Open your function.php file and paste following codes in this file.

// Standard Size Thumbnail
if(false === get_option("thumbnail_crop")) {
     add_option("thumbnail_crop", "1"); }
     else {
          update_option("thumbnail_crop", "1");
     }
// Medium Size Thumbnail
if(false === get_option("medium_crop")) {
     add_option("medium_crop", "1"); }
     else {
          update_option("medium_crop", "1");
     }
// Large Size Thumbnail
if(false === get_option("large_crop")) {
     add_option("large_crop", "1"); }
     else {
          update_option("large_crop", "1");
      }

Step 2. Save your file and upload again. Thanks to wp-snippet.com for this simple code.Pl consider sharing if you enjoyed this.


Kindly Bookmark this Post using your favorite Bookmarking service:
Technorati Digg This Stumble Stumble Facebook Twitter

Advertise Here

0 comments:

Post a Comment


ABOUT THE AUTHOR

Hi! I am K Ajay, currently live in Chandigarh, India. A young Web Designer, Pro Blogger, Graphic Designer & an addicted Web Developer. I love working on Blogger and WordPress using CSS Tricks,and Web Designing. Read More...

FOLLOW US HERE


RANDOM POSTS

Bwidgets4all-Helping Bloggers with Blogging Tricks © 2013. All Rights Reserved | Free Blogger Templates | | Back to Top