Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wp_enqueue_script

function wpdocs_theme_name_scripts() {
    wp_enqueue_style( 'style-name', get_stylesheet_uri() );
    wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'wpdocs_theme_name_scripts' );
Comment

wp_enqueue_script jquery

// include custom jQuery
function shapeSpace_include_custom_jquery() {

	wp_deregister_script('jquery');
	wp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js', array(), null, true);

}
add_action('wp_enqueue_scripts', 'shapeSpace_include_custom_jquery');
Comment

wp_enqueue_script

wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer);

wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', array ( 'jquery' ), 1.1, true);
Comment

PREVIOUS NEXT
Code Example
Php :: open json file php 
Php :: how to get just the first row from a table in laravel 
Php :: php ternary 
Php :: factory laravel 
Php :: how make custom menu in wordpress 
Php :: laravel add auto increment 
Php :: laravel eloquent delete 
Php :: Woocommerce remove add to cart message 
Php :: laravel set config 
Php :: how to insert multiple selected 
Php :: laravel auth without vue or bootstrap 
Php :: avg rating get in join in laravel 8 
Php :: get domain url with https in laravel 
Php :: send OTP php 
Php :: php endwhile 
Php :: target class admin homecontroller does not exist laravel 8 
Php :: laravel validation digits 
Php :: multiple routes same controller laravel 
Php :: php get url after question mark 
Php :: Laravel adding Foreign Key Constraints 
Php :: how to change php version in cpanel 
Php :: how to check if key is present in json in php 
Php :: laravel wherenotin 
Php :: remove last character from string php 
Php :: laravel add user 
Php :: laravel json response 
Php :: {php} in smarty 
Php :: codeigniter form validation datetime 
Php :: php object 
Php :: laravel migration alter column unique 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =