Theme Reviews


Average Rating
3 out of 5 stars
You are currently viewing the reviews that provided a rating of 3 stars. Click here to see all reviews.
Problem with ALT attribute
By , for WP 3.9

I like this theme and have been using it for about two years or so. I host my images using Picasa Web gallery and insert link to image into post. Unfortunately, there was always a problem with image's ALT attribute, every time I use ALT the image the preview won't show up on front page. This was because of the way the image was pulled from post source - the URL was concatenated with sanitized ALT along with width and height attributes. So, instead of http://example.com/images/abc.jpg you would get http://example.com/images/abc.jpgAltAttributeHereWidht500Height300 - which is exactly why front page preview was broken.

If you care to fix this, you need to dig into theme's functions file (functions.php) and locate function the_post_image_url($size=large). Inside it, find the following lines:

} elseif ( $linkedimgurl ) {
		echo $linkedimgurl;

replace the second line (echo... ) with the following:

$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = $matches [1] [0];
echo $first_img;

This fixed things for me. You can see it working on http://zealusmedia.com

You must log in to submit a review. You can also log in or register using the form near the top of this page.