Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wordpress enqueue js

add_action( 'wp_enqueue_scripts', 'my_plugin_assets' );
function my_plugin_assets() {
    wp_enqueue_style( 'custom-gallery', plugins_url( '/css/gallery.css' , __FILE__ ) );
    wp_enqueue_script( 'custom-gallery', plugins_url( '/js/gallery.js' , __FILE__ ) );
}
Source by kinsta.com #
 
PREVIOUS NEXT
Tagged: #wordpress #enqueue #js
ADD COMMENT
Topic
Name
9+9 =