WordPress.org

Ready to get started?Download WordPress

Forums

BJ Lazy Load
[resolved] Only Loads Images if I'm Logged In (9 posts)

  1. twicealive
    Member
    Posted 1 year ago #

    Very odd...

    When I'm logged in the front facing pages load nicely, but when I'm logged out, only the placeholder images load...

    Any ideas?

    thanks,
    Michael

    http://wordpress.org/extend/plugins/bj-lazy-load/

  2. Bjørn Johansen
    Member
    Plugin Author

    Posted 1 year ago #

    You're not degistrating jQuery, are you?

    If you provide me with an URL to your site, I can take a look.

  3. twicealive
    Member
    Posted 1 year ago #

    Due to the error, the plugin is not activated at this time.

    But if you can tell anything from looking, my url is http://RustyGigabyte.net

  4. Bjørn Johansen
    Member
    Plugin Author

    Posted 1 year ago #

    You aren't loading jQuery even though you have several script which relies on it. You are probably deregistrating it.

  5. twicealive
    Member
    Posted 1 year ago #

    When I am logged in and your plugin is activated then everything is loading fine.

    Also, when I am logged out and your plugin is deactivated everything is loading fine.

    But, when your plugin is activated and I am logged out the jQuery appears to be deregistered.

    So I don't know what to do to correct this problem.

    Thanks,
    Michael

  6. twicealive
    Member
    Posted 1 year ago #

    Do you use save jQuery so it doesn't conflict with mootools and other libraries?

  7. Bjørn Johansen
    Member
    Plugin Author

    Posted 1 year ago #

    I had a look at your site while the plugin was deactivated and you did not load jQuery at all.

    The plugin works fine in noConflict mode.

  8. twicealive
    Member
    Posted 1 year ago #

    Thank you for your reply.

    Now I understand what's happening, but I'm not sure how to correct my problem.

    Your plugin is working fine for the admin when he is logged in, so jQuery does appear to be registering only when the admin is logged in, for some reason.

    What is the best way to force jQuery to load along side of mootools?

  9. twicealive
    Member
    Posted 1 year ago #

    Okay. The following worked for me:

    I added this code to the functions. php file:

    //jQuery - Use Google CDN instead of WP jQuery
    function my_scripts_method() {
    if (!is_admin()) {
        wp_deregister_script( 'jquery' );
        wp_register_script( 'jquery',     'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js');
        wp_enqueue_script( 'jquery' );
     }
    }
    
    add_action('wp_enqueue_scripts', 'my_scripts_method');

    Thanks again your your help

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.