• Resolved hoyer801

    (@hoyer801)


    I’m having trouble getting your plugin to work on a new site I’m developing. The plugin is adding the colorbox class to the links correctly, jquery is already loaded by the theme, but none of the colorbox js is being loaded.

    Ironically, this is pretty much the exact same problem on a different blog that I posted about here several months ago. However, I have already verified that the theme header does include wp_head function.

    Any suggestions?

    https://ealainfibers.com/roundabouts/the-cora-cloche/

    Your help is greatly appreciated. I really prefer your plugin to all the many alternatives out there. Thanks for making it available.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter hoyer801

    (@hoyer801)

    Just realized I updated my permalinks after posting this. Here’s the new link:
    https://ealainfibers.com/products/the-cora-cloche/

    Thread Starter hoyer801

    (@hoyer801)

    I got it working, but not sure if it’s a good way to do it. I had to comment out these lines from functions.php in my theme:

    //function my_deregister_script_init() {
    //    if ( !is_admin() ) {
    //      wp_deregister_script( 'jquery' );
    //   }
    //}

    Let me know if there’s a better way to do it. So far, everything still works.

    Plugin Contributor techotronic

    (@techotronic)

    Hi,

    if you deregister a script on a site, all depending JavaScripts won’t work any more (the colorbox library depends on jquery).

    Why was this done in the first place?

    Cheers,
    Arne

    Thread Starter hoyer801

    (@hoyer801)

    Apparently, the creator of the theme simply put the link to the necessary javscript files directly in the header.php and home.php files. That was breaking your plugin since it deregistered the jquery that your plugin depends on.

    I was able to rewrite it so that all the scripts required by the theme as well as the jquery for this plugin were registered as scripts in the functions.php file. I had to dive into the documentation to figure out exactly how to do that, but it was fun to learn some new stuff.

    Thanks again for this plugin. It really is outstanding work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: jQuery Colorbox] Images display, not colorbox’ is closed to new replies.