I’ve got the custom meta setup for an image upload. This image has a title and alt text assigned to it. I’m trying to find out how to display that text when I display the image. In the documentation for the Types API, it says that i can set the alt and title parameters:
‘alt’ => alternative text e.g. ‘My image’
‘title’ => hover text e.g. ‘My image’
But how do I pull the alt and title text that was from the image when I uploaded it?
I’m pulling a random post that has an image attached to it, so the alt and title text needs to be the same as that random post’s image, or else I could statically assign it an alt and title (per the api), but I don’t know how to pull the information that is already in the database and assign it to the alt and title parameters of the API.
- The topic ‘[Plugin: Types – Custom Fields and Custom Post Types Management] Adding Alt and Title Text to Custom’ is closed to new replies.