Welcome, Guest
Username:
Password:
Remember me
  • Page:
  • 1

How-To Remove WordPress Version From Styles and Scripts?

How-To Remove WordPress Version From Styles and Scripts? [ 2 years 3 weeks ago ] #6

Add the below to your functions.php file
// Remove WP Version From Styles	
add_filter( 'style_loader_src', 'sdt_remove_ver_css_js', 9999 );
// Remove WP Version From Scripts
add_filter( 'script_loader_src', 'sdt_remove_ver_css_js', 9999 );

// Function to remove version numbers
function sdt_remove_ver_css_js( $src ) {
	if ( strpos( $src, 'ver=' ) )
		$src = remove_query_arg( 'ver', $src );
	return $src;
}

Please Log in to join the conversation.

Alex experienced Freelance Web Developer with a demonstrated history of working in the information technology and services industry. Skilled in User Experience, Joomla, WordPress, User Interface Design, Front-end Development, and IT Service.
  • Page:
  • 1