• Resolved anthonybarro

    (@anthonybarro)


    Hello,

    And thanks for a great plugin – works as it should.

    I want to deregister some of the scripts, in order to merge and register a single js file. However, if I use the “deregister” function in functions.php, it removes all scripts, and not just the one I’m targeting.

    I realize this may be outside the scope of “support”, but if you can assist, I’d really appreciate it.

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter anthonybarro

    (@anthonybarro)

    Steven

    (@shazahm1hotmailcom)

    Yep, that was the forum thread I was going to refer you to.

    Hope it helps!

    Thread Starter anthonybarro

    (@anthonybarro)

    Yeah, thanks.

    Small follow up, if I may:

    So, wp_dequeue_script( ‘ez-toc-js’ ); dequeues all the js. However, is it possible to single them out individually? For instance, can I deregister only “waypoints”?

    Steven

    (@shazahm1hotmailcom)

    You could just deregister the waypoints script but in doing so you will also deregister the core script too. This is because the waypoints script is a dependency of the core script so if all dependencies are not met, WP will not enqueue the script. If you have special needs, your are better off editing the plugin to suit.

    I do have this in my issue tracker, better decouple this. So, I will probably do this in a future update. But, honestly, it is pretty low priority since this meets my particular needs.

    If you are dev, and want to tackle this, I do accept pull requests on Github. I already have a couple I need to review and merge.

    Thread Starter anthonybarro

    (@anthonybarro)

    Thanks for the explanation and your consideration.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Deregister scripts and styles’ is closed to new replies.