[Shortcodes in Own Plugin] – Loading CSS and JS
-
Hello everyone!!!!
I implemented my own plugin where I added also a shortcode’s function to load some content in a page from the plugin.
I have this little issue:<script src="../wp-content/plugins/myownplugin/js/myscript.js" type="text/javascript"></script>
I can see it isn’t really a good solution since plugin’s name could change so I tried with echo plugins_url(‘js/myscript’); but while debugging with Firebug I figured it didn’t return the REAL path of the script but the PAGE url + /%3C?php%20echo%20plugins_url(%27js/myscript.js%27,%20dirname(%20__FILE__)%20);%20?%3E”…
How I can get this plugins_url work?..
thanks a lot in advance to everyone
Ciao,
Luigi
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘[Shortcodes in Own Plugin] – Loading CSS and JS’ is closed to new replies.