CMS & WordPress
I'm having a problem which is confusing the hell out of me. I worked out a path, which has a number of variables below, and then tried to echo it out as the source of an image. When I do this the image source is only echoing the first part, i.e. the stylesheet directory, and nothing after, and so the image is not displaying. I've tried echo'ing the $path value and it looks perfect, it's just when I use it as the image source it's only displaying the first part. Why is this?
$path = bloginfo( 'stylesheet_directory' ) . "/libs/timthumb.php?w=140&q=100&src=" . get_post_meta($post->ID, 'image', true);
<img src="<?php echo $path; ?>" class="what-image" />
Probably not the problem, but what happens if you change from double to single quotes?
Hey, thanks for the suggestion. I figured it out though. I needed to use 'get_bloginfo' instead of just 'bloginfo', so with 'get_bloginfo( 'stylesheet_directory' )' it worked perfectly.
This topic is now archived. It is frozen and cannot be changed in any way.