Setting image title (or alt attributes) as the Fancybox pop-in title

Hi!

In Customizr (version less than 3.10), the title displayed at the bottom of the Fancybox popin is the post or page title instead of the image title.

customizr-fancybox-title

 

To fix this, here’s a quick javascript snippet that displays the image title (or the alt field if there’s no title) for the FancyBox popin title.

Copy this code in your functions.php file :

 

 I hope this will be useful for you guys!

Your comments and improvements are welcome as always.

 

3 thoughts on “Setting image title (or alt attributes) as the Fancybox pop-in title”

Comments are closed.