1. Remove Wordpress Version Number -
By default WordPress adds a meta tag which displays the WordPress version number that your WordPress site is running on. The version number is added just for tracking. This information can be useful to hacker to identify which version of WordPress you are running. If you are not running the latest version of WordPress the hackers can try to target the known vulnerabilities in that version to hack your site.
The correct way to remove the version information both from the head section and RSS feeds of your site is to add the following code to your functions.php file of your theme.
************* Code ***********
function my_remove_version_info() { return '';}add_filter('the_generator', 'my_remove_version_info');
************* End Code ***********
For more help for this topic Read this article : http://techtalk.virendrachandak.com/how-to-remove-wordpress-version-number/#ixzz2lOMa8VpK
2. Remove Wordpress Version Number - from CSS & JS files
Many CSS and JS files in the WordPress also have the WordPress version number appended to their source.
For more help for this topic Read this article http://techtalk.virendrachandak.com/how-to-remove-wordpress-version-parameter-from-js-and-css-files/#ixzz2lOU1pOTz
Follow us: @virendrachandak on Twitter
Remove only the “ver” parameter which have WordPress version number from all enqueued CSS and JS files
1
2
3
4
5
6
7
8
| // remove wp version param from any enqueued scriptsfunction vc_remove_wp_ver_css_js( $src ) { if ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) ) $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 ); |
For more help for this topic Read this article http://techtalk.virendrachandak.com/how-to-remove-wordpress-version-parameter-from-js-and-css-files/#ixzz2lOU1pOTz
Follow us: @virendrachandak on Twitter



0 comments:
Post a Comment