Hi Webtreats!
How can i use the new Link, Alt & title attributes to fancy image shortcode?
Thank You!
Tibor
(6 posts)
(5 voices)
Hi Webtreats!
How can i use the new Link, Alt & title attributes to fancy image shortcode?
Thank You!
Tibor
Hi tnemes,
First replace this file on your server with the one in the .zip attached to this post:
wp-content/themes/awake/lib/functions/shortcode.php
This corrects a small bug with the [fancy_images] shortcode we just discovered.
You can then use the new attributes like this:
[fancy_images link="" title="" alt="" height="" width=""] path to images [/fancy_images]
Hi,
I would also like to give the fancy images a title tag, but each image another title.
My code at the moment:
[fancy_images height=120 width=190]
http://die-seiltaenzerin.de/wp/wp-content/gallery/seventeens/seventeens_xxv_fr.jpg
http://xxxxx/wp-content/gallery/seventeens/seventeens_xx_fr.jpg
http://xxxxx/wp-content/gallery/seventeens/seventeens_xl_mo.jpg
http://xxxxx/wp-content/gallery/seventeens/seventeens_xxii_fr.jpg
http://xxxxx/wp-content/gallery/seventeens/seventeens_xxiv_mo.jpg
http://xxxxx/wp-content/gallery/seventeens/seventeens_xxxiv_mo.jpg
http://xxxxx/wp-content/gallery/seventeens/seventeens_xxxv_fr.jpg
http://xxxxx//wp-content/gallery/seventeens/seventeens_xxxvi_sa.jpg
[/fancy_images]
Each image should have its own title, that appears in the lightbox.
How is this possible?
Thanks a lot.
I think other users would like this also so I created a type of fix for this..
1. Create a backup of your theme folder in case something goes wrong.
2. Download and extract the zip file.
3. Copy the shortcode.php file over to /wp-content/themes/awake/lib/functions/shortcode.php
4. You can now specify a title and alt attribute for each image by separating them with a comma like this..
[fancy_images title = "Title1, Title2, Title3" alt = "Alt1, Alt2, Alt3"]
The only drawback is that you cannot use commas in your text. If you need to use commas then let me know and we can change it to some other character.
Let us know if this works for you guys.
I'm using the syntax you describe for image titles but what I'm seeing for the ALT and title when I click on one of the images is the full list of titles including the commas. Any idea what I'm doing wrong?
[fancy_images height=90 width=90 title="Shoes 18th century, Madam CJ Walker’s Salon early 20th century, John Deere 21st century, Labor ephemera, Curator Peter Liebhold on a research trip, Telphone operators mid 20th century, Alexander Graham Bell telephone late 19th century, Intern Thomas Russo"]
Hello danagreil,
Did you download and extract the file I posted above? I just tested it out again and it appears to be working fine.
You must log in to post.