Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #4673
    Åsmund Gravem
    Participant

    Is there an easy way to use a png as a button to open up a lightbox that display another image or a video?
    I am not an advanced wordpress user, so an example code would be great.

    #4674
    Bartosz
    Keymaster

    Yeah, of course.

    Just add rel=”lightbox” to a text or image link (png). The link should point to an image or video.

    For example:
    <a href="http://image-to-open-path.jpg" rel="lightbox"><img src="http://png-image-button-path.png"></a>

    #4675
    Åsmund Gravem
    Participant

    I found the solution… bugs in my code.

    #4730
    ben
    Participant

    How can I do this within a shortcode for a button?

    #4732
    Bartosz
    Keymaster

    I don’t think you can do it with a shortcode button, unless it has an option to add rel attribute to an image link output.

    Basically, if you are using WP gallery or insert image link into post, Responsive Lightbox should handle that automatically. Otherwise you need to add rel=”lightbox” to image links in yout theme.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.