Mostly everyone’s heard of the TimThumb issue, which sounds like is solved, but it got me to thinking about how to avoid using TT if possible.
I’m using Twentyeleven as the base for my child theme. I’m using one child for my main blog and another for the sub blogs, so both are enabled for thumbnails. Also, the network settings allow for image uploads.
I also have a custom post type that I created on the main page, and I’m using thumbnail images from those posts in a slider above the content I’m describing here.
What I want to do is display thumbnails alongside the stream created by SiteWide Tags plugin.
I did some research and found that you can change the media thumbnail settings through (this code may not be perfect):
update_option ('thumbnail_size_w', 150, true); update_option ('thumbnail_size_h', 150, true);
which would change the default size for the small thumbs to 150px and crop them as well.
You can also create and name a custom size (which is gets to what my question is) using:
add_image_size ( 'my_custom_size', 60, 60, true);
which can then be presented in the loop for example with
I’ve played with this, but I’m a bit confused. When using Sitewide Tags, in the loop created on my network home page, seems there’s a lot going on to consider. There’s the local default thumb size setting in the admin settings my sub sites are using, the default thumb size on the theme my main site is using, and the custom settings I created that will be in the functions.php file for either my sub blogs, main blog or both I’m not sure where to put them).
Seems very simple at first, then get’s more complicated as I try to implement it. I want the simplest solution possible.
At first this seemed to best work by modifying the sub sites’ function.php files to create a custom size, and do the same (using the same custom size name) on my main blog’s function.php file, but when I try to call the image, it does not change. Each of the images is different size, reflecting some of the testing I did, but I was assuming setting a custom size and calling for that would have resulted in the same size thumbnails from each of the posts.
By the way, I also used the regenerate thumbnail plugin before I refreshed the page.
After all this, I’m wondering, “Is it better to just use TimThumb?”
I hope this all makes sense, and thanks for any input.
You may want to look at http://compu.terlicio.us/2011/04/timthumb-for-wordpress-multisite/
There are many issues with TimThumb and MultiSite :/
Thanks, and I read through that.
One question: which thumbnail settings affect post thumbnails in the loop created by Sitewide Tags plugin?
The main site’s thumbnail setting or the sub blogs? Which settings can I rely on to change the thumbnail size to make them uniform?
As I change the thumbnail size for the child blogs, the size also changes in the Sitewide Tags Loop output, even after I try to customize the size through the main blog’s functions.php and loop using
I’m not 100 percent sure but it seems like that means that the sub blog’s thumbnail settings are what affects the SWT plugin’s loop thumbnail size.
I’m a newbie to all this, so I’m not saying this from a position of authority, but would be cool if I could just set the thumbnail size on the Sitewide Tags settings page. Better yet, choose whether or not I want to select dimensions for the thumbnails or not.
Right, because it;s pulling the size of the actual thumbnail, which you;ve set on the child blogs…
Ok, so I kind of have that sorted. Thank you.
In your opinion, what’s better? Use TimThumb, or set custom thumbnail sizes and call those in the loop(s)?
Use WordPress thumbnails. Unless you know how to rewrite the call to timthumb images for multisite.
Thanks Andrea and Ipstenu!
Wish I could do something to give back for all the generous advice. You guys are amazing.
I accept bribes of quilt fabric. 😉
(kidding. a bit.)
Ha ha, for all your help, would be happy to!!!
Thank you again.
FYI, here’s an article on the subject I came across today:
I was able to set new thumbnail sizes for my theme and avoid TimThumb altogether.
- The topic ‘TimThumb issue, Sitewide Tags, update_option, and add_image_size function’ is closed to new replies.