adding css and js files using action hook
function add_theme_scripts() {
wp_enqueue_style( 'style', get_stylesheet_uri() );
wp_enqueue_style( 'slider', get_template_directory_uri() . '/css/slider.css', array(), '1.1', 'all');
wp_enqueue_script( 'script', get_template_directory_uri() . '/js/script.js', array ( 'jquery' ), 1.1, true);
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'add_theme_scripts' );
Also in JavaScript:
- javascript round up
- how to add up all the numbers in between 0 and that number
- read json pandas
- c# razor for loop javascript
- convert image url to base64 javascript
- angular elementref
- react lifecycle hooks
- js check if number has decimals
- react native get OS
- how reliable is js hasownproperty
- rect to rect collision
- js typeof number
- react search when stop typing
- js scrolling in div
- vue js Elements in iteration expect to have 'v-bind:key' directives
- javascript greater than or equal to
- node red admin password setting
- Sum of all the multiples of 3 or 5
- node js write file
- javascript convert number to spreadsheet column
- insert js in html
- react class and props example
- import a script to my react componetn
- install nuxt js