Avada Image Link in Lightbox

Home/Avada Image Link in Lightbox

I recently built a site for a client using the fantastic Avada theme, and they asked me how it was possible to have images showing up in a lightbox rather than a standalone file or an attachment page.

They wanted to add the prettyPhoto plugin, but there is no need. Avada has it integrated. All you need to do is add a data-rel selector and rel selector to your href and img tags (shown below) and the image link will open in the lighbox.

A simple fix, but I thought one worth sharing since Avada is so popular.

Example:
<a class=”” id=”” title=”” href=”” data-rel=”prettyPhoto”> <img rel=”prettyPhoto” alt=”” src=”” /></a>
2017-05-19T15:48:04+00:00 July 4th, 2015|WordPress Snippets|0 Comments

About the Author:

Warren Chandler is a freelance web programmer and web developer, based in Frinton on Sea, Essex. Warren specialises in web programming, web design, corporate identity, copy writing, SEO, logo and print media for home, work, and mobile platforms.

Leave A Comment