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>