內容簡介
Change Core Slugs 是一個外掛,它允許您設定自定義的永久網址作為 WordPress 核心提供的預設網址的替代方案。雖然 WordPress 已經提供了這個功能,但是需要通過手動在代碼中設置新配置才能使用。這個外掛提供了友好的使用者介面,讓所有網站管理員都可以更改預設的網址。
您可以更改以下網址:
作者檔案中的author基礎網址
搜尋檔案中的search基礎網址
存檔的分頁頁面或單個文章中的page基礎網址
單個文章評論的分頁頁面中的comments-page基礎網址
評論訂閱中的comments基礎網址
訂閱中的feed基礎網址
當您更改任何網址時,您將不會被從使用舊網址的頁面重新導向。如果您再次更改任何網址,也是如此。如果您想要重定向,您必須通過伺服器規則或使用其他外掛來設置。
如果您停用此外掛,將恢復使用舊的預設網址,使用新網址的 URL 將停止運作。保留新網址的唯一方法是通過在代碼中手動設置它們。
注意:由於 WordPress 核心中的兩個錯誤,某些情況下設置自定義網址將無法正常工作。這些情況包括page或comments-page包含任何非 ASCII 字元(票證#41891),或者設置feed或comments基礎網址(票證#43274)。在這兩個錯誤被修復之前,您可以使用包含修復程式的臨時插件。如果您未使用上述引發錯誤的功能,則無需使用此外掛程式。
此外掛程式可於 GitHub 取得。
使用方法
前往「設定」>「更改核心網址」頁面。
外掛標籤
開發者團隊
原文外掛簡介
Change Core Slugs is a plugin that allows you to set custom permalink slugs instead of default ones that are provided with WordPress core. This functionality is already available in WordPress, however it can be used by manually setting new configuration in the code. What this plugin does is that it provides friendly user interface where all site admins can change default slugs.
You can change:
author base in authors archives
search base in searches archives
page base in pagination pages of archives or in single posts
comments-page base in pagination pages of single posts comments
comments base in comments feeds
feed base in feeds
When you change any slug, you will not get redirection from the pages that used old slug. Same goes if you again change any slug. If you want redirection, you must set it through server rules or with other plugins.
If you disable this plugin, old, default slugs will be restored and URLs with new slugs will stop working. The only way to keep new slugs is by manually setting them in the code.
NOTE: because of two bugs in WordPress core, in some cases setting custom slugs will not work properly. These cases are when page or comments-page include any non-ASCII character (ticket #41891), or when feed or comments bases are set (ticket #43274). Until these two bugs are fixed, you can use temporary plugin that includes fixes. You do not need that plugin if you do not use features that trigger bugs from above.
And it’s on GitHub.
Usage
Got to Settings > Change Core Slugs page.
