內容簡介
### WordPress 外掛簡介:
這個外掛讓您可以在 WordPress 中自訂和國際化作者檔案、搜尋結果、評論和頁面網址的 rewrite bases。它提供了一個易於使用的界面,在 Permalinks 設定頁面上設置這些基礎值。
#### 重要特點:
- 可自訂作者、搜尋、評論、頁面(分頁)的網址rewrite bases
- 如果可用,自動使用 WordPress 的語言特定術語作為預設值
- 與 WordPress Permalinks 設定頁面無縫集成
### 問答:
1. 如何處理在您的網站上看不到永久連結更改的情況?
- 前往您的 WordPress 管理面板中的「設定」>「連結」。
- 在頁面底部,點擊「保存更改」按鈕,即可,無需進行任何更改。
2. 這個外掛的主要動機是什麼?
- 在 WordPress 中,作者、搜尋、評論和頁面(分頁)的國際化重寫基礎不是 WordPress 核心的一部分。這是因為 WP_Rewrite 類使用了寫死的字符串,直到 2024 年才得到翻譯。有一個舊的 ticket (#1762) 討論了這個問題,其中包括修改 WP_Rewrite 屬性與外掛的想法。這個外掛實現了這個解決方案。它擴展了原生永久連結設置頁面,並添加了一個部分來更改作者、搜尋、評論和頁面(分頁)的 rewrite bases。預設情況下,這些基礎值是基於您網站當前語言的。
3. 如何貢獻這個外掛?
- 請查看外掛的 GitHub 存儲庫。
4. 如果想瞭解更多關於 WordPress Rewrite API 的資訊在哪裡可以找到?
- 請參閱 WordPress Rewrite API 文件。
外掛標籤
開發者團隊
② 後台搜尋「Rewrite Bases Internationalization」→ 直接安裝(推薦)
原文外掛簡介
This plugin allows you to customize and internationalize the rewrite bases for author archives, search results, comments and page slugs in WordPress. It provides an easy-to-use interface in the Permalinks Settings page to set custom values for these bases.
If you notice that your permalink changes aren’t reflecting on your site, try the following steps:
Go to Settings > Permalinks in your WordPress admin panel.
Without making any changes, click the “Save Changes” button at the bottom of the page.
Key Features
Customize rewrite bases for author, search, comments and page (pagination) slugs
Automatically uses WordPress’s language-specific terms as defaults, if available
Integrates seamlessly with the WordPress Permalinks Settings page
Motivation
Internationalized rewrite bases for author, search, comments and page (pagination) in WordPress are not part of the WordPress Core. This is because the WP_Rewrite class uses hardcoded strings which were never translated until 2024. There is an old ticket (#1762) that discusses this issue, including the idea of modifying the WP_Rewrite property with a plugin. This plugin implements that solution. It extends the native Permalinks settings page and adds a section to change the rewrite bases for author, search, comments and page (pagination). By default, these are based on the current language of your site.
Want to contribute?
Check out the Plugin GitHub Repository.
Additional Info
For more information about the WordPress Rewrite API, please visit the WordPress Rewrite API documentation.
