WordPress.org

Forums

Simple lightbox not working (9 posts)

  1. adminadminadmin
    Member
    Posted 1 year ago #

    Hi

    I want to upload a new post where I will have several images. My idea is to make them small in the post, and allow the user to see them bigger using the Simple Lightbox plugin. However, I can't make it work. I press Add media, select the image, select link to either media page or attachment page (according to SLB begginers guide), and then upload the post. I have a link in the image, but it is not displaying any lightbox. Can you help me fixing this issue?

    Thank you

  2. Archetyped
    Member
    Posted 1 year ago #

    Hi, can you please provide a link to a page that exhibits the issue you're experiencing?

    Also, please provide the other details on the instructions for reporting issues so that your issue can be properly evaluated.

    Thanks.

  3. adminadminadmin
    Member
    Posted 1 year ago #

    http://ipd2004.com/ipd-in-ids-2013/

    The image has the link to enlarge itself, but its not working.

  4. Archetyped
    Member
    Posted 1 year ago #

    Your site is loading an outdated version of jQuery. SLB and WordPress require the version of jQuery officially included with WordPress to function properly.

    See here for more information on jQuery Support.

    It appears that your site's theme is loading the outdated version of jQuery. You can confirm this by switching to a default WordPress theme (e.g. Twenty-Twelve). If the issue persists, see here for instructions on identifying plugin conflicts.

    Removing the outdated version of jQuery will resolve your issue.

  5. adminadminadmin
    Member
    Posted 1 year ago #

    I removed the outdated version, which was being load in the functions.php file, following the steps stated in the following link (deleting the deregister and register lines):
    http://stackoverflow.com/questions/16078231/outdated-version-of-jquery-in-wordpress

    However, now the picture is a link to a page which has only the image, and if I use the jQuery check item, it says the jQuery is not loaded. I guess then I need to load the current jQuery version but how can I do this? What I want is the picture shown bigger in the same website address when the user clicks on the image.

    Thank you.

  6. adminadminadmin
    Member
    Posted 1 year ago #

    Okay, I found the solution myself. I replaced these lines from functions.php:

    wp_deregister_script('jquery'); // initiate the function
      wp_register_script('jquery', get_template_directory_uri().'/library/js/libs/jquery-1.7.1.min.js', false, '1.7.1');

    for the same lines but for the latest jquery version:

    wp_deregister_script('jquery');
    wp_register_script('jquery', ("http://code.jquery.com/jquery-latest.min.js"), false, '');

    Is it the right way to do it? Now it is working, and the jQuery version used is 1.10.2.

    Thank you.

  7. Archetyped
    Member
    Posted 1 year ago #

    Almost. SLB loads jQuery directly from WordPress as this is the best way to make sure that the correct version of jQuery always loads.

    Remove all wp_deregister_script() and wp_register_script() calls that refer to jQuery in your theme to allow the built-in version of jQuery to be used.

    If SLB is not working after doing the above, post an update and I will take another look.

  8. adminadminadmin
    Member
    Posted 1 year ago #

    If I delete these two lines, the jquery version is not set, according to "jQuery Check".

  9. Archetyped
    Member
    Posted 1 year ago #

    If jQuery is not being loaded automatically then either a theme or a plugin is still doing something. Does SLB work properly when switching to a default theme (e.g. Twenty Fourteen)?

    If not, then I would suggest following the steps for identifying plugin conflicts as another plugin may be affecting jQuery loading.

Topic Closed

This topic has been closed to new replies.

About this Topic