Avada Image Link in Lightbox

/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.

<a class=”” id=”” title=”” href=”” data-rel=”prettyPhoto”> <img rel=”prettyPhoto” alt=”” src=”” /></a>
2018-11-07T01:10:42+00:00July 4th, 2015|WordPress Snippets|1 Comment

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.

One Comment

  1. JacquieFoulds August 2, 2017 at 4:19 am - Reply

    Thanks. Worked perfect for me.

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.