anurag-singh
12/12/2017 - 6:15 AM

Load fresh CSS file each time when that CSS file get modified. User will see the latest changes all time.

Load fresh CSS file each time when that CSS file get modified. User will see the latest changes all time.

// Load fresh CSS file each time when that CSS file get modified (User will see the latest changes all time)
// Ref - https://developer.wordpress.org/reference/functions/wp_enqueue_style/#comment-2056
wp_enqueue_style('main-style', get_stylesheet_directory_uri() . '/assets/css/main.css', array(), filemtime(get_stylesheet_directory() . '/assets/css/main.css'), false);