mxmaniac
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How do I use "add_image_size" function for more thumbnail sizes.Well, I FINALLY seem to have gotten this to work, with a different code variation. It was quite frustrating because through all my searching, I found so many different variations of the code, yet none of them worked for me. Heres what actually seemed to work for adding 4 new sizes, and is easy to decipher to add more or less.
if ( function_exists( 'add_image_size' ) ) { add_image_size( 'Mysize-200', 200, 200 ); add_image_size( 'Mysize-400', 400, 400 ); add_image_size( 'Mysize-500', 500, 500 ); add_image_size( 'Mysize-500tall-1000wide', 1000, 500 ); } add_filter('image_size_names_choose', 'my_image_sizes'); function my_image_sizes( $sizes ) { return array_merge( $sizes, array( 'Mysize-200' => __('Mysize-200'), 'Mysize-400' => __('Mysize-400'), 'Mysize-500' => __('Mysize-500'), 'Mysize-500tall-1000wide' => __('Mysize-500tall-1000wide'), ) ); }
Placed that into a child theme’s functions.php, and it seems to be working so far.
Tags: (for anyone else searching for this solution)
How to use wordpress add_image_sizes
How to add image sizes to wordpress.
How to add more thumbnail sizes to wordpress.
wordpress add_image_size not working
wordpress add_image_size doesn’t workForum: Fixing WordPress
In reply to: How do I use "add_image_size" function for more thumbnail sizes.Well, I seem to be doing something wrong still. Right now I have this in the functions.php file of a child theme. Although wordpress does seem to generate the new sizes, as confirmed by ftp’ing into my upload folder. I still cannot select any new sizes from wordpress when trying to add media into a post. Here is my code so far.
<?php if ( function_exists( 'add_image_size' ) ) { add_image_size( 'Mysize-200', 200, 200 ); add_image_size( 'Mysize-400', 400, 400 ); add_image_size( 'Mysize-500', 500, 500 ); } add_filter('image_size_names_choose', 'my_image_sizes'); function my_image_sizes($sizes) { $addsizes = array( "Mysize-200" => __( "Mysize-200" ), "Mysize-400" => __( "Mysize-400" ), "Mysize-500" => __( "Mysize-500" ) ); $newsizes = array_merge($sizes, $addsizes); return $newsizes; } ?>
Do I have some syntax wrong somewhere, or missing something?
Forum: Fixing WordPress
In reply to: How do I use "add_image_size" function for more thumbnail sizes.Thanks for the responses. I tried them all with varying results, but wasn’t quite sussessful. Many of them do seem to get wordpress to generate the thumbnails, as I can see them when I ftp into my upload folder.
However when I go to try and use them, when clicking the “add media” button, when making a new post. I’m still generally only given the default sizes.
The code I had posted in the first post at least gave me one extra one. I could add extra lines of
‘add_image_size( ‘new-size’, 650, 650 );’
which seems to work for generating more sizes, yet they won’t show up. The bottom part of the code would make at least one size show up, but I have been unable to figure out how to modify it to make all sizes that I add show up.Forum: Fixing WordPress
In reply to: Question about working on theme offline then migrating.Are you saying that copying the theme folder is all that’s needed? And that theme customizations and settings are not stored in the database? Or does it vary from theme to theme?
I’ve been using suffusion and I’m pretty sure it stores many of its settings in the DB.
So this is interesting. When I do that, the full size media does indeed seem to change, at least when I go to “Page Info”, in firefox, then the media tab, it shows the image is indeed the larger version.
However wordpress itself still thinks its the original dimensions, and lists them in the menus. Is there any way to get wordpress to realize the new dimensions to avoid confusion?
I actually had tried this myself before even asking the question, but had thought it didn’t work because of what wordpress was reporting.
Thanks.