January 21, 2013 at 7:17 pm #19604
This addition will be good for SEO and also good to make image popup more informative.
Could you please tell me how to add alt to < img > and title to wrapping < a > for slider image.
So when you click here:
Image will have prettyphoto title and desctiption like here:
I did some research, I think this file and function should be modified: function-set-avia-frontend.php -> avia_image_by_id
You are really good support and I’m interested to make avia framework better.
AleksandrJanuary 21, 2013 at 7:40 pm #104291
You add the title and alternate text on Media > Library > then select the image that you want to edit.
IsmaelJanuary 21, 2013 at 10:20 pm #104292
I know about adding through Media Library, but theme files should be modified too..
BTW, I found link how to add title to < a >, but it working with some bugs, maybe because it’s for another theme:
How to modify avia.js -> $.fn.avia_activate_lightbox to work on Choices and display correct title attribute in < a > tag.
Any help will be appreciated!
AleksandrJanuary 22, 2013 at 4:54 pm #104293
As Peter pointed out in that topic, the default behavior for a title, is to add the title into the ALT attribute or your thumbnail image. To have display a description, add the description into the TITLE attribute or your link.
The script on that page is a year old and submitted by a user to change the way that theme interacts with pretty photo.
Just to note, you can add the information when you are uploading the images originally through the image editor that pops up and don’t have to only go through the wordpress media library.
DevinJanuary 22, 2013 at 6:12 pm #104294
Thanks for answer, I managed to add title to ALT attribute of an image.
But second part is to push this ALT attribute from image to a wrapping link < a > TITLE.
<i>”The script on that page is a year old and submitted by a user to change the way that theme interacts with pretty photo.”</i>
Yes, it’s pretty old and for another theme, but it’s very similar to choices function avia.js -> $.fn.avia_activate_lightbox that should be modified to push img ALT to link < a > TITLE.
Please help to accomplish that.
AleksandrJanuary 24, 2013 at 2:40 am #104295
If no one is able, you’ll need to look into a freelance developer to get the result you are looking for.
DevinJanuary 24, 2013 at 11:37 am #104296
It’s an ambitious project since there are a various exclusions to consider such as situations where the image is simply an image without links,, or pretty boxes. I haven’t tested all the new Media toys that came with wp3.5, but at this moment ,
if i understand you correctly, the last hurdle is to detach the value of an alt from an img tag and attach that value to the anchor wrapping the image but attach it as a title tag? And this should be done to images on the 3 links pasted above only (and of course similar formats on pages elsewhere)? .. I think jQuery may just do the trick since the idea of a php solution for this feels bulkier (as well as lengthy).
I will try a few things out, so please hang on.
The topic ‘Slider image with alt and title attributes’ is closed to new replies.