Discuz! Board

 找回密碼
 立即註冊
搜索
熱搜: 活動 交友 discuz
查看: 3|回復: 0

You can check if the version number has been removed or is still visible by v...

[複製鏈接]

1

主題

1

帖子

5

積分

新手上路

Rank: 1

積分
5
發表於 2024-2-18 19:28:51 | 顯示全部樓層 |閱讀模式
Checking the version of WordPress in the dashboard Log in to your WordPress dashboard, then you can see your WordPress version number in the " At a Glance " section. picture (1) 2. Checking the WordPress version in the header section of the site To find your WordPress version in the header section of the site, according to the image below, just right-click on your site page and select " View page source " to display the site codes. picture (2) There you can find the WordPress version as shown in the image below (in the image below, 5.7.2 is shown as the current WordPress version). picture(3) 3. Checking the version of WordPress in Styles and JavaScript Many WordPress scripts and styles contain the WordPress version number. You can find it by viewing the source code of the page on your site. ?ver=4.9.7 4. Checking the version of WordPress in the RSS feed Your site's RSS feed contains the WordPress version number.


To check this issue, type "example.com/feed" (replace your domain name with example.com ) in your phone numbers list web browser, as you can see in the image, you can see the WordPress version number. Tip: Replace example.com with your domain name. picture (4) How to remove WordPress version number There are several methods by which you can remove the WordPress version number. In this method, no plugins are used because if this plugin is not updated regularly with WordPress, it can compromise the security of the site. 1. Remove WordPress version number from header and RSS To remove the version number from your WordPress site, just add the following code to your " functions.php " file. You can see the functions.php file (number 2) by going to " View>Skin Editor " (number 1). picture (5) function remove_wordpress_version() { return ''; } add_filter('the_generator', 'remove_wordpress_version'); Go to the end of php functions and then add the code (number 1) and click on " update file " (number 2). This will remove the WordPress version number from the header and RSS.




You can check if the version number has been removed or is still visible by viewing the page source on your site. picture (6) 2. Remove WordPress version number from scripts and CSS The above method only hides the WordPress version number from the title and RSS. To remove version numbers from CSS and scripts, simply add the following code to your functions.php file. // Pick out the version number from scripts and styles function remove_version_from_style_js( $src ) { if ( strpos( $src, 'ver=' . get_bloginfo( 'version' ) ) ) $src = remove_query_arg( 'ver', $src ); return $src; } add_filter( 'style_loader_src', 'remove_version_from_style_js' ); add_filter( 'script_loader_src', 'remove_version_from_style_js'); After adding the codes to your functions.php file, don't forget to update the file. Using these two methods, you can completely hide or remove the WordPress version number from the header, RSS, CSS and scripts. It is also recommended to update your WordPress site and not just hide the WordPress version.uppose you have installed WordPress on your host and server and start working.

回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

Archiver|手機版|自動贊助|GameHost抗攻擊論壇

GMT+8, 2025-2-6 09:43 , Processed in 0.448311 second(s), 18 queries .

抗攻擊 by GameHost X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回復 返回頂部 返回列表
一粒米 | 中興米 | 論壇美工 | 設計 抗ddos | 天堂私服 | ddos | ddos | 防ddos | 防禦ddos | 防ddos主機 | 天堂美工 | 設計 防ddos主機 | 抗ddos主機 | 抗ddos | 抗ddos主機 | 抗攻擊論壇 | 天堂自動贊助 | 免費論壇 | 天堂私服 | 天堂123 | 台南清潔 | 天堂 | 天堂私服 | 免費論壇申請 | 抗ddos | 虛擬主機 | 實體主機 | vps | 網域註冊 | 抗攻擊遊戲主機 | ddos |