How to enqueue a script on a specific URL that contains multiple parts

is_page() accepts only one optional parameter $page which should be (int|string|array) representing Page ID, title, slug, or array of such. On a standard WP installation your code should look like this. add_action( ‘wp_enqueue_scripts’, ‘enqueue_date_picker_styles_and_scripts’, 101); function enqueue_date_picker_styles_and_scripts() { if ( is_page(‘page-slug-here’) ) { // Replace page-slug-here with slug of page at races/community/add wp_enqueue_style(‘bootstrap-datepicker-css’, ‘//cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/css/bootstrap-datepicker.standalone.css’); wp_enqueue_script(‘bootstrap-datepicker-js’, … Read more

Set different css stylesheet for specific pages [duplicate]

Yes, it is possible. All you need to do is to check whether you are on a specific page or not. For example, this will enqueue your scripts only for the page that has the contact-us slug: add_action( ‘wp_enqueue_scripts’, ‘enqueue_theme_css’ ); function enqueue_theme_css() { if( is_page( ‘contact-us’ ) ){ wp_enqueue_style( ‘default’, get_template_directory_uri() . ‘/css/default.css’ ); … Read more

Move dashicons.min.css to Footer

Please try below code : add_action( ‘wp_print_styles’, ‘my_deregister_styles’ ); function my_deregister_styles() { wp_deregister_style( ‘dashicons’ ); } Replace your css path “PATH_OF_CSS” : add_action( ‘wp_footer’, ‘register_wp_footer’, 11 ); function register_wp_footer() { wp_enqueue_style( ‘dashicons’, ‘PATH_OF_CSS’ ,array(), false, true ); }