skip to Main Content

Can WordPress enqueue a script in the header?

I'm creating a plugin for WordPress, when I use below code in plugin main file it load js in <head>, it works fine. wp_enqueue_script ( 'custom-script', 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-v4- rtl/4.6.0-1/js/bootstrap.bundle.min.jsf'); but when I use it inside a function (for example show_form() ):…

VIEW QUESTION
Back To Top
Search