For some reason the thumbnail images on my site are not being displayed correctly with the image path that TimThumb.php is pulling from. Here's the code I'm currently using on my archive and cat pages.
The broken thumbnail that is displayed shows this image path;
I some how need the image path to be relative and remove the http:// w w w.mywebsite.com directly after the ?src=
When I remove that, the image path can be found, but I have no idea how to make this work in the code at the top. Any ideas would be great. Thanks.
Code:
<div class="grid-image"><a class="hover_play_small" href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><img src="<?php echo get_template_directory_uri(); ?>/scripts/timthumb.php?src=<?php echo $image[0]; ?>&w=76&h=60" alt="<?php the_title(); ?>" /></a><?php echo $icon; ?></div>
<?php else: ?>
<div class="grid-image"><a href='<?php the_permalink(); ?>' title='<?php the_title(); ?>'><img src="<?php echo get_template_directory_uri(); ?>/scripts/timthumb.php?src=<?php echo $attachment[0]; ?>/images/thumbnail.png&w=76&h=60" alt="<?php the_title(); ?>" /></a><?php echo $icon; ?></div>
The broken thumbnail that is displayed shows this image path;
Code:
http://w w w.mywebsite.com/wp-content/themes/AwesomeTheme/scripts/timthumb.php?src=[COLOR="Yellow"]http://w w w.mywebsite.com[/COLOR]/wp-content/uploads/2013/02/imagename-76x60.jpg&w=76&h=60
I some how need the image path to be relative and remove the http:// w w w.mywebsite.com directly after the ?src=
When I remove that, the image path can be found, but I have no idea how to make this work in the code at the top. Any ideas would be great. Thanks.