Thumbnail Images Not Showing Up? Solution Here (includes MU)
Are you able to see your images fine once you click on them but the thumbnails aren't working? If so, read on. This appears to be a common problem for some yet quite easy to fix in most cases.
If you are a WPMU user, read this post instead.
The reason this is most likely occurring has to do with the image thumbnail resizer path not being mapped correctly on your site. You can easily fix this by going into
wp-content/themes/classipress/includes/ and edit img_resize.php.
Comment out the following (line 7) in img_resize.php like so:
Code:
// $image_url = "../../../../wp-content/uploads/classipress/".$_GET["url"];
then below it, add the following block of code (make sure to scroll down and copy everything):
Code:
$paths = array(
"../..",
"../../..",
"../../../..",
"../../../../..",
"../../../../../..",
"../../../../../../.."
);
foreach($paths as $path) {
$cpath = $path . '/wp-content/uploads/classipress/' . $_GET["url"];
if(@file_exists($cpath)) {
$image_url = $cpath;
}
}
Save and then try loading up your page again. It should now work.
If not, chances are you didn't setup the image upload folder correctly. Make sure your folder structure looks exactly like this in (all in lowercase) /
wp-content/uploads/classipress/
Thumbnails still not showing up?
Let's take a look at another thing. Navigate to your ClassiPress site homepage where the thumbnail is not showing up. Either using Firebug (a firefox plugin) or by viewing the page source code (right-click -> view page source or view source), look for code similar to this (yours will be different b/c your url is unique):
The important part here is the url
Code:
http://www.mysite.com/wp-content/themes/classipress/includes/img_resize.php?width=50&height=50&url=testing-this-post-13362.png
Copy and paste this into another browser tab or window.
-Does your image show up correctly or is the page blank? (It's probably blank which means something is still wrong)
-Does the path correct (
http://www.mysite.com/wp-content/themes ... resize.php" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;"?
-Is there no image name after
&url= at the end of the url?
If there's no image name after the
&url= then it has to do with the "images" custom field on that specific ad. Go into WordPress and edit this specific ad. Scroll down to the custom field section and make sure you actually have an "images" custom field and it contains image name(s) to actual image(s).
[attachment=0:3mjowguo]cp_image_cust_field2.gif[/attachment:3mjowguo]
If it looks similar to above then (depending on how many images you've uploaded on this ad) and it's still not working, go to your /
wp-content/uploads/classipress folder and make sure those images actually exist. Are the names exactly the same?
If you have nothing in the images custom field then it means your images aren't getting uploaded at all. Go back and re-read the install guide and make sure you've created the /classipress/ folder in the uploads directory and that the permissions have been set correctly.
Chances are by this point you've figured it out. If you still have not, please post your questions or comments below and make sure to include a link to your site so someone can help troubleshoot.
Would also love to hear from people who got it working and which fix ended up doing it. Sharing your solution often helps others fix theirs as well.