Version number is a parameter of wp_enqueue_style()
. As per the Codex, here are all the parameters that wp_enqueue_style
accepts.
1 | wp_enqueue_style( $handle, $src, $deps, $ver, $media ); |
So for example to load a stylesheet with a version number you’d do the following:
1 2 3 4 5 | function wpa_90820() { wp_enqueue_style('my-styles', get_stylesheet_directory_uri() .'/my-styles.css', array(), '1.0' ); } add_action('wp_enqueue_scripts', 'wpa_90820'); |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.