Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Enqueue WP scripts and styles from a single action hook.

/**
 * Proper way to enqueue scripts and styles.
 */
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

PREVIOUS NEXT
Code Example
Php :: Trongate custom routing 
Php :: how to generate unique alphanumeric 6 digit code through php myadmin 
Php :: how to increment a number after concatinating it with a date function in php 
Php :: Drupal get node id from view 
Php :: avoid sql injection in password field 
Php :: laravel Join columns of Day, Month , Year to calculate age 
Php :: woocommerce affiliate product link image to external link 
Php :: how to reduce time taken by php script on server 
Php :: how exactly works prompt parameter wp skipping password 
Php :: php get array key by value 
Php :: php artisan insert user in database with tinker 
Php :: PHP strpos — Find the position of the first occurrence of a substring in a string 
Php :: what does php stand for 
Php :: accessing class in php 
Php :: array_key_first not works 
Php :: php how to use multi byte functions 
Php :: javatpoint php 
Php :: wp css deregister 
Php :: php generate html attributes from array 
Php :: run php after product added 
Php :: ascii vrednosti php 
Php :: count rows mysql limit php 
Php :: Stopping On First Validation Failure 
Php :: learndash logo link 
Php :: Remove values from select list based on condition 
Php :: upload video file in mysqli using php 
Php :: phpImage 
Php :: pluck only category name and id from model in laravel 
Php :: how to validate students who made payment in php and mysql 
Php :: all locales php 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =