Correct URL to display Thumb in WP MU


/ Published in: PHP
Save to your folder(s)

http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/


Copy this code and paste it in your HTML
  1. $theImageSrc = 'path/To/Image.jpg';
  2. global $blog_id;
  3. if (isset($blog_id) && $blog_id > 0) {
  4. $imageParts = explode('/files/', $theImageSrc);
  5. if (isset($imageParts[1])) {
  6. $theImageSrc = '/blogs.dir/' . $blog_id . '/files/' . $imageParts[1];
  7. }
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.