Skip to content
Advertisement

WordPress enqueue scripts not adding scripts

I’m trying to load a script into a WordPerss page, however it seems the enqueue script does not add anything.

I’m using the following script

JavaScript

Did I make a mistake somewhere? The code seems correct to me.

Advertisement

Answer

Ok after some debugging i found the error was in the wp_add_inline_script part, the handle for this has to be the same as wp_enqueue_script (atlease after this change it works)

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement