Retrieving alt_tag attritbute using a custom field
-
Hi there, I have a theme that uses TimThumb to generate thumbnail images on a gallery page. The problem is that image alt tags are not showing for each image on the main gallery pages, see here:
https://christinecraven.com/gallery/press
I’ve tried to generate the alt tag by adding a custom field in each post/ portfolio item, called “alt_tag” and then calling it in the category.php file in my theme:
<div class="imgHentry"><?php the_post_thumbnail( 'thumbnail' ); ?> <strong>alt="<?php echo get_post_meta($att, 'alt_tag', true); ?>"</strong> <div class="linkIcon" style="width:150px; height:150px;"><a href="<?php the_permalink(); ?>" class="goto-icon" style="width:150px; height:150px;"></a></div></div><!-- .imgHentry --><?php } ?>
It’s not working unfortunately and I’m not sure how to go about this.
Thanks!
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Retrieving alt_tag attritbute using a custom field’ is closed to new replies.