Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

enqueue wordpress

function my_scripts_method() {
    wp_enqueue_script(
        'custom-script',
        get_stylesheet_directory_uri() . '/js/custom_script.js',
        array( 'jquery' )
    );
}

add_action( 'wp_enqueue_scripts', 'my_scripts_method' );
Source by wordpress.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #enqueue #wordpress
ADD COMMENT
Topic
Name
3+7 =