- This topic has 7 replies, 3 voices, and was last updated 3 years, 10 months ago by
Tom.
-
AuthorPosts
-
June 14, 2017 at 7:33 am #333450
Caroline
Hi – I’m having trouble viewing the version number for style.css in dev tools for both my child theme, and for the parent theme. When I use the ‘sources’ tab in dev tools to view the file name for both these files it simply displays ‘style.css’.
I can see the wp_enqueue_style() code in functions.php which includes a parameter for the timestamp to generate a version number, so I really can’t figure out why it’s not showing up! Also, when I look at the ‘sources’ tab in dev tools for this website (generatepress.com) it shows the file name and version number (ie style.css?ver=1497116279); I’m assuming the functions.php code is the same, so I’m confused as to why it’s not showing up for my site.
Can anyone help?
GeneratePress 1.3.48GP Premium 1.3June 14, 2017 at 9:00 am #333497Leo
StaffCustomer SupportHi there,
Are you using a caching plugin? Can you provide a link to your site? Thanks!
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 14, 2017 at 9:05 am #333500Caroline
Hi Leo – no, I’m not using a caching plugin. Would it be possible to send you a link to the site privately? It’s a staging site and I’m not quite ready to release it to the world yet!
June 14, 2017 at 9:27 am #333522Tom
Lead DeveloperLead DeveloperAre you using a plugin or code snippet that hides query strings? For example, see the “Remove Query Strings” section on this page: https://generatepress.com/fastest-wordpress-theme/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJune 14, 2017 at 9:30 am #333530Caroline
Yes indeed! I am using this:
function remove_css_js_ver( $src ) {
if( strpos( $src, ‘?ver=’ ) )
$src = remove_query_arg( ‘ver’, $src );
return $src;
}
add_filter( ‘style_loader_src’, ‘remove_css_js_ver’, 10, 2 );
add_filter( ‘script_loader_src’, ‘remove_css_js_ver’, 10, 2 );Trying to get my Google speed insights score up! Am I going to need to remove it?
June 14, 2017 at 10:09 am #333544Tom
Lead DeveloperLead DeveloperYes, if you want query strings. Personally I find them really helpful – stops caching issues π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJune 14, 2017 at 11:27 am #333593Caroline
OK, thank you! I’ve used that particular wp_enqueue_style() parameter to solve caching problems in the past which was why I wanted to address the issue in case I had problems again – I just didn’t know the output was called a query string so didn’t make the connection with the code snippet.
Thanks so much for the quick and helpful reply!
June 14, 2017 at 6:54 pm #333753Tom
Lead DeveloperLead DeveloperYou’re very welcome! π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.