Map title to alt text
-
Hello,
I want to map the title field to alt text but I can’t figure out how to get it from ITCP/Exif data. I went to ITCP/EXIF -> Edit alt text and then can’t find which value must be used in the dropdown
-
Thanks for your question and for the positive MLA review you posted. Reviews like yours are a great motivation to keep working on the plugin and supporting its users.
You can find detailed instructions for updating your ALT Text values in this earlier topic:
Bulk Edit: Title, Alt Tag, descripion and so on broken on &
It looks like you want to use the item’s Title value to populate the ALT Text field; is that right? If so, simply replace the
template:[+file_name+]in the earlier topic withtemplate:[+post_title+]to accomplish your task. Note that you must usepost_title, nottitle, becausetitleis only available when executing the[mla_gallery]shortcode.I am marking this topic resolved, but please update it if you have any problems or further questions regarding the steps and suggestions in the earlier topic. Thanks again for the review and for our interest in the plugin.
Ok, thank you it does the trick.
I tried all these instructions but it’s not working for me yet. Do you mean I should literally type [+post_title+] or just post_title in that field?
When you write “in that field” I understand that to mean the ALT Text field in the Bulk Edit area; is that right?
If so, then you should literally type
template:[+post_title+], including thetemplate:prefix. It’s the prefix that tells MLA to replace the[+post_title+]substitution parameter with the actual value of the Title field for each item.Does that help?
This actually does the trick just needed to follow your directions exactly. Thank you David. I wonder is there an article I can read out there on best practices for optimizing my WordPress Media Library for SEO?
Thanks for your update with the good news regarding my clarification. I have responded to your related topics as well:
Regarding your question about SEO optimization, I must admit that I am not an SEO expert by any means. The best resource I have found is the Yoast SEO plugin and the ecosystem that has grown up around it. Their web site (https://yoast.com/) is a great source of tips and other information. You might also find this earlier topic helpful:
Pull Featured Image from MLA Gallery
I hope the above suggestions are helpful. Good luck with your application!
I just wanted to chip in – if replacing alt tags for featured image and want to use the post title not the title of the image, you can use template:[+parent_title+] because using post_title there uses the title of the image not the post
Thanks, @stephenoconnor, for the additional tip.
Using
[+parent_title+]works great as a way to assign the ALT Text from the Title value of the item’s parent when it is attached to the post/page.I have found some cases where WordPress does not “attach” the item when it’s used as the Featured Image. Also, there is no prohibition against using an item for more than one post/page. As long as you look out for those cases, it’s a good technique.
The topic ‘Map title to alt text’ is closed to new replies.