Getting the alt text from an embedded image
-
I’ve searched all over and found a bunch of different topics on this, but I don’t believe anyone has been searching for as simple a solution as I am.
I’ve decided to make all my page titles images, while it looks nice, it screws up another portion of my site that is based on pulling the title of the page. So the premise is just make the alt the previous name of the page.
Example the page ‘Colleges’ is now <img src=’https://website/images/colleges.jpg’ alt=’Colleges’ />
All I need to do is know if there is an easier way to get that alt text other than calling the_title() and then using a regex to grab it.
Thanks
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Getting the alt text from an embedded image’ is closed to new replies.