How can you change the version of style.css in WordPress theme?

If you need to change your style.css or any css file after the file edited or modified in wordpress theme then you need to add this code in your functions.php file.

if(!is_admin())
wp_enqueue_style( 'stylesheet-id', get_stylesheet_directory_uri() . '/style.css', array(), filemtime( get_stylesheet_directory() . '/style.css' ) );

stylesheet-id‘ this id is important please keep in mind if you declare this different then a new css link will added to your existing link.

Just check the stylesheet id which is currently running in the then that id put in the code.

Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *