Good day!
There is a site on Wordpress 4.2.2. The site is cloned to a local server. As a result of the change of the main style file, changes on the site are not displayed. I noticed that the link tag has a version parameter ?ver=4.2.2
. Disconnected it using the found solution:
// remove wp version param from any enqueued scripts function vc_remove_wp_ver_css_js( $src ) { if ( strpos( $src, 'ver=' ) ) $src = remove_query_arg( 'ver', $src ); return $src; } add_filter( 'style_loader_src', 'vc_remove_wp_ver_css_js', 9999 ); add_filter( 'script_loader_src', 'vc_remove_wp_ver_css_js', 9999 );
But it did not help. Styles are still cached. There is no explicitly specified link tag in the header.php
template.
<? wp_head() ?> <link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri().'/favicon.ico' ?>" /> <script type="text/javascript"> ajaxurl = '<?php echo admin_url('admin-ajax.php'); ?>'; templateuri = '<?php echo get_template_directory_uri()?>'; </script> <?php global $title ?>
Therefore, to add ?1
to the desired style, as indicated in one of the solutions on stackoverflow is impossible.
Third-party page caching plugins are not used.
Please tell me if there are other solutions to this issue?