WordPress.org

Ready to get started?Download WordPress

Forums

WP Lightbox 2
[resolved] Plugin does not work for me when used in gallery (2 posts)

  1. cazman
    Member
    Posted 1 year ago #

    I've tried testing the plugin using the theme I've written, the default twenty-whatever themes, on a custom post type I've made and on the regular post types, whatever I try the images don't expand lightbox style when I click on them.

    However, when I add rel="lightbox" to a single image the plugin does work, so it seems to be an issue with the gallery shortcode.

    The method I create the gallery is to upload images to the post and then in the upload media window I go to the gallery tab and click insert gallery. This is the same as using the gallery shortcode I think.

    http://wordpress.org/extend/plugins/wp-lightbox-2/

  2. cazman
    Member
    Posted 1 year ago #

    Managed to solve this in the end, for others looking for a solution this was my problem:

    I'd made a custom template for a post type, and where my gallery rendered I had this code:

    do_shortcode('[gallery link="file" size="thumbnail" exclude="'. get_post_thumbnail_id(get_the_ID()) .'"]')

    All I had to do was wrap this in the jqlb_apply_lightbox() function and it worked!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.