Tagged: alt tags shoutbox
October 17, 2011 at 12:18 pm #6420
first of all thanks for the great theme. My problem is:
there is no image alt tags anywhere in the theme, the only thing I can see in the source code is “alt” and there is no way to replace it with the correct alt tag I’d like to set in there. How can I add ALT tags to images in Shoutbox theme?
Thank youOctober 17, 2011 at 2:35 pm #54068
the alt tag used is actually the ‘Description’ field in the media library – so you need to put your alt text into the ‘Description’ field for each image.October 18, 2011 at 7:04 pm #54069
ok great but I’d like to replace those tags with the value of a custom field, so I’d like to know which code I could modify to achieve this. Where exactly in the theme files do you define image ALT tags.
Thank you!October 20, 2011 at 1:27 am #54070
you can’t use custom fields to target a specific image from the library as you can’t target a specific image when there are multiple images added to the post. As Dude said, you can easily modify the Alt tags in your media library. Simply put your value for the alt tag in your Description of the image and it will work fine. Could you elaborate why you’d want to use custom fields?October 20, 2011 at 9:16 pm #54071
I don’t want to append the value of a custom field to the description of the image file itself, just output it in the theme. So my custom field is the name of a web merchand, I already enter it manually, so if I had to manually reenter it for the post image (only one) it shouldn’t help me a lot. There must be a way to replace the alt tag automatically. I couldn’t find it however.
RegardsOctober 21, 2011 at 6:09 am #54072
open up shoutboxframeworkphpfunction-set-avia-frontend.php
return "<img src='".$image_src."' title='".$image_title."' alt='".$image_description."' />";
return "<img src='".$image_src."' title='".$image_title."' alt='my-alt' />";
Instead of “my-alt” enter your own text.October 24, 2011 at 10:33 am #54073
The topic ‘Image ALT tags missing’ is closed to new replies.