Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wordpress hook add javascript

add_action( 'wp_enqueue_scripts', 'my_custom_script_load' );
function my_custom_script_load(){
  wp_enqueue_script( 'my-custom-script', get_stylesheet_directory_uri() . '/custom-scripts', array( 'jquery' ) );
}
Comment

wordpress add javascript

add_action('wp_head', 'your_function_name');
function your_function_name(){
?>
<script>PASTE HEADER CODE HERE</script>
<?php
};
Comment

PREVIOUS NEXT
Code Example
Php :: php json_encode 
Php :: laravel form validation 
Php :: show created_at as normal date laravel blade 
Php :: php array longest string 
Php :: get taxonomies for custom post type 
Php :: laravel request integer 
Php :: php curl asyc 
Php :: how to add recaptcha validation in php 
Php :: return response not found laravel api response 
Php :: how to get last executed query in laravel 
Php :: php imap install 
Php :: laravel migration change column default 
Php :: php syntax <<< 
Php :: ajax post example php 
Php :: laravel new date 
Php :: convert array to string laravel 
Php :: Custom Product Price in Loop of Woocomare 
Php :: php find part of string in array 
Php :: In PackageManifest.php line 122: 
Php :: set session after login with laravel 
Php :: laravel-medialibrary change name of file 
Php :: laravel get all users except role spatie 
Php :: carbon get time 
Php :: get slogan wp 
Php :: php float round 
Php :: $this- attribute laravel 
Php :: php short string 
Php :: php test page 
Php :: csrf token mismatch laravel 
Php :: php scandir 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =