Welcome! To use this support forum, please Login or Join Today!
You are here → Home :: Forum Home :: WordPress Themes Support :: Presstige WordPress Theme :: Thread
Update the code with the WP Multisite image fix?
Hi,
I was testing Presstige on a WP Multisite installation (subdomain based) and followed your instructions below to get image scaling working with TimThumb.
http://www.simplethemes.com/support/viewthread/256/#780
Could you add that fix into the Presstige theme (and the other themes) since I think it would be very useful for everyone.
Thanks,
Kirk.
I’ve updated the function with both the NGG and Network fixes.
Let me know if it works for you.
http://www.simplethemes.com/wordpress-themes/changelog/presstige
function get_image_path() { global $post; global $blog_id; $id = get_post_thumbnail_id(); if(stripos($id,'ngg-') !== false && class_exists('nggdb')) { $nggImage = nggdb::find_image(str_replace('ngg-','',$id)); $thumbnail = array($nggImage->imageURL,$nggImage->width,$nggImage->height); } else { $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); $theimage = $thumbnail[0]; // TEST FOR WP MU if (isset($blog_id) && $blog_id > 0) { $realpath = explode('/files/', $theimage); if (isset($realpath[1])) { $theimage = get_site_option('siteurl') . 'wp-content/blogs.dir/' . $blog_id . '/files/' . $realpath[1]; } } } return $theimage; }
Great… that works perfectly.
Thanks for the ultra-fast response.
Kirk.