Last active
March 20, 2016 17:14
-
-
Save talaia/10760735 to your computer and use it in GitHub Desktop.
Cropping problem with add_image_size
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
We found a lot of problems when trying to crop images through the Wordpress' add_image_size function. | |
Finally, we found out that the stupidest solution was the good for us: we just deleted a dash | |
from the string at the first parameter. We had 'foto-portada' witch didn't work, and now, 'fotoportada', wokring well. | |
It's kinda weird. | |
If this still does'nt work, try to hook your add_image_size call into the after_setup_theme hook. | |
:) | |
*/ | |
add_image_size('fotoportada', 400, 100, true); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment