WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WP jQuery Lightbox] Is this a complete package (10 posts)

  1. Tim
    Member
    Posted 4 years ago #

    Having downloaded this plugin, then created a new post with an image, nothing new happens. I've looked at the html for the post and rel"lightbox" wasn't automatically added. I then added it, but it still doesn't work.

    Am I missing an important component (additional plugin?), as the description indicates that this plugin is all that is needed. If this isn't the case, please could you add a link to the relevant plugin?

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

  2. ulfben
    Member
    Posted 4 years ago #

    It doesn't apply to images. It applies to links to images.

    Here's a common usage.

    < href="image.jpg" rel="lightbox"> <img src="thumb.jpg" /> </ a >

    Now, clicking the thumbnail would yield a nice lightbox nodal window.

    Hope that helps.

  3. Tim
    Member
    Posted 4 years ago #

    Thanks for the reply. I know that it applies to links, but don't know why it doesn't work. (I should have been clearer in my original post)

    I have a link just like the one you have described and it doesn't work, so wondering if something is missing or if something additional needs to be done.

  4. Tim
    Member
    Posted 4 years ago #

    Working on something else I noticed I had a problem with relative links, so changed the theme to the default and it works as expected!

    I just need to fix the theme instead :-/

  5. ulfben
    Member
    Posted 4 years ago #

    Thanks for updating us on the issue! Good luck with the theme.

  6. Matt Jensen
    Member
    Posted 4 years ago #

    The problem of course is that the plugin requires your theme to have the <?php wp_footer(); ?> function in it, even though it is not stated anywhere in the plugin documentation. This function should most likely be called in your theme's footer.php file, however it will depend on your theme. Just had the same problem myself, could not figure out why nothing was happening until I realised the JS Lightbox file was never being output in the source code for a page. Tracking the reason down identified that the JS is specified as needing to be output in the WP footer function, so obviously if this function isn't there then the plugin won't work.

  7. shomazta
    Member
    Posted 4 years ago #

    adding the wp_footer function didn't help in my case :/

  8. MorgMarie
    Member
    Posted 3 years ago #

    Thanks so much for mentioning that <?php wp_footer(); ?> was needed. I've been scratching my head for a few days trying to figure it out.

  9. luisten
    Member
    Posted 3 years ago #

    I had the exact same problem and found no documentation regarding the issue. Comparing the generated code with the default theme I found that I just had to add:

    <?php wp_head(); ?>

    to the header.php file (inside the <head> tag obviously) for it to start working like a charm.

  10. francishunger
    Member
    Posted 3 years ago #

    Dear Ulf Ben,

    I run into the same problem, so I would suggest you add that point to the FAQ

    For Theme developers: <?php wp_footer(); ?> must be called from the footer.php, because the javascript for Lightbox is not loaded from the header, but the footer

    This is of course just a suggestion, but might lead to less frustration.

    In addition I'd like to thank you a lot for maintaining the plugin, which I guess is quite some work. I think many people appreciate it. Thanks again,

    Francis

Topic Closed

This topic has been closed to new replies.

About this Topic