前言介紹
- 這款 WordPress 外掛「Custom Permalinks」是 2008-10-31 上架。
- 目前有 100000 個安裝啟用數。
- 上一次更新是 2025-04-29,距離現在已有 4 天。
- 外掛最低要求 WordPress 2.6 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 7.0 以上。
- 有 115 人給過評分。
- 論壇上目前有 2 個提問,問題解答率 50%
外掛協作開發者
外掛標籤
url | link | address | redirect | permalink |
內容簡介
name or slug), add the filter that looks like this:
function yasglobal_exclude_posts( $post ) {
// Replace '2' with ID of the post you want to exclude
if ( 2 === $post->ID ) {
return '__true';
}
return '__false';
}
add_filter( 'custom_permalinks_exclude_post', 'yasglobal_exclude_posts' );
Exclude Pages
To exclude custom permalink form from any pages (based on ID, name or slug), add the filter that looks like this:
function yasglobal_exclude_pages( $page ) {
// Replace '2' with ID of the page you want to exclude
if ( 2 === $page->ID ) {
return '__true';
}
return '__false';
}
add_filter( 'custom_permalinks_exclude_page', 'yasglobal_exclude_pages' );
Exclude Taxonomies
To exclude custom permalink form from any taxonomy (based on taxonomy name), add the filter that looks like this:
function yasglobal_exclude_taxonomies( $taxonomy ) {
// Replace 'taxonomyname' with name of the taxonomy you want to exclude
if ( 'taxonomyname' === $taxonomy ) {
return '__true';
}
return '__false';
}
add_filter( 'custom_permalinks_exclude_taxonomy', 'yasglobal_exclude_taxonomies' );
原文外掛簡介
In case of found any site breaking issue after upgrading to the latest version then please report the issue on WordPress Forum OR GitHub with complete information to reproduce the issue and move back to the old version. You can download any of the old version from here: https://wordpress.org/plugins/custom-permalinks/advanced/
Lay out your site the way you want it. Set the URL of any post, page, tag or category to anything you want. Old permalinks will redirect properly to the new address. Custom Permalinks give you ultimate control over your site structure.
Be warned: This plugin is not a replacement for WordPress’s built-in permalink system. Check your WordPress administration’s “Permalinks” settings page first, to make sure that this doesn’t already meet your needs.
This plugin is only useful for assigning custom permalinks for individual posts, pages, tags or categories. It will not apply whole permalink structures or automatically apply a category’s custom permalink to the posts within that category.
Filters
Add `PATH_INFO` in `$_SERVER` Variable
add_filter( 'custom_permalinks_path_info', '__return_true' );
Disable Redirects
To disable complete redirects functionality provided by this plugin, add the filter that looks like this:
function yasglobal_avoid_redirect( $permalink ) {
return true;
}
add_filter( 'custom_permalinks_avoid_redirect', 'yasglobal_avoid_redirect' );
Disable Particular Redirects
To disable any specific redirect to be processed by this plugin, add the filter that looks like this:
function yasglobal_avoid_redirect( $permalink ) {
// Replace 'testing-hello-world/' with the permalink you want to avoid
if ( 'testing-hello-world/' === $permalink ) {
return true;
}
return false;
}
add_filter( 'custom_permalinks_avoid_redirect', 'yasglobal_avoid_redirect' );
Exclude Permalink to be processed
To exclude any Permalink to be processed by the plugin, add the filter that looks like this:
function yasglobal_xml_sitemap_url( $permalink ) {
if ( false !== strpos( $permalink, 'sitemap.xml' ) ) {
return '__true';
}
return;
}
add_filter( 'custom_permalinks_request_ignore', 'yasglobal_xml_sitemap_url' );
Exclude Post Type
To remove custom permalink form from any post type, add the filter that looks like this:
function yasglobal_exclude_post_types( $post_type ) {
// Replace 'custompost' with your post type name
if ( 'custompost' === $post_type ) {
return '__true';
}
return '__false';
}
add_filter( 'custom_permalinks_exclude_post_type', 'yasglobal_exclude_post_types' );
Exclude Posts
To exclude custom permalink form from any posts (based on ID, Template, etc), add the filter that looks like this:
function yasglobal_exclude_posts( $post ) {
if ( 1557 === $post->ID ) {
return true;
}
return false;
}
add_filter( 'custom_permalinks_exclude_posts', 'yasglobal_exclude_posts' );
Allow Accents Letters
To allow accents letters, please add below-mentioned line in your theme functions.php:
function yasglobal_permalink_allow_accents() {
return true;
}
add_filter( 'custom_permalinks_allow_accents', 'yasglobal_permalink_allow_accents' );
Allow Uppercase Letters
To allow uppercase letters/words, please add below-mentioned line in your theme functions.php:
function yasglobal_allow_uppercaps() {
return true;
}
add_filter( 'custom_permalinks_allow_caps', 'yasglobal_allow_uppercaps' );
Allow Redundant Hyphens
To allow redundant hyphens, please add below-mentioned line in your theme functions.php:
function yasglobal_redundant_hyphens() {
return true;
}
add_filter( 'custom_permalinks_redundant_hyphens', 'yasglobal_redundant_hyphens' );
Manipulate Permalink Before Saving
To make changes in permalink before saving, please use custom_permalink_before_saving filter. Here is an example to see how it works.
function yasglobal_permalink_before_saving( $permalink, $post_id ) {
// Check trialing slash in the permalink.
if ( substr( $permalink, -1 ) !== '/' ) {
// If permalink doesn't contain trialing slash then add one.
$permalink .= '/';
}
return $permalink;
}
add_filter( 'custom_permalink_before_saving', 'yasglobal_permalink_before_saving', 10, 2 );
Remove `like` Query
To remove like query to being work, add below-mentioned line in your theme functions.php:
add_filter( 'cp_remove_like_query', '__return_false' );
Note: Use custom_permalinks_like_query filter if the URLs doesn’t works for you after upgrading to v1.2.9.
Thanks for the Support
I do not always provide active support for the Custom Permalinks plugin on the WordPress.org forums, as I have prioritized the email support. One-on-one email support is available to people who bought Custom Permalinks Premium only.
Bug reports
Bug reports for Custom Permalinks are welcomed on GitHub. Please note GitHub is not a support forum, and issues that aren’t properly qualified as bugs will be closed.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Custom Permalinks」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1.0 | 1.1 | 1.2 | 0.1.1 | 0.2.1 | 0.2.2 | 0.3.1 | 0.4.1 | 0.5.1 | 0.5.2 | 0.5.3 | 0.6.1 | 0.7.1 | 0.7.2 | 0.7.3 | 0.7.4 | 0.7.6 | 0.7.7 | 0.7.8 | 0.7.9 | 0.9.1 | 0.9.2 | 0.9.3 | 1.0.1 | 1.0.2 | 1.2.1 | 1.2.2 | 1.2.3 | 1.2.4 | 1.2.5 | 1.2.6 | 1.2.7 | 1.2.8 | 1.2.9 | 1.3.0 | 1.4.0 | 1.5.0 | 1.5.1 | 1.6.0 | 1.6.1 | 1.6.2 | 1.7.0 | 1.7.1 | 2.0.0 | 2.0.1 | 2.1.0 | 2.2.0 | 2.3.0 | 2.4.0 | 2.5.0 | 2.5.1 | 2.5.2 | 2.6.0 | 2.7.0 | 2.8.0 | trunk | 0.7.10 | 0.7.11 | 0.7.12 | 0.7.13 | 0.7.14 | 0.7.15 | 0.7.16 | 0.7.17 | 0.7.18 | 0.7.19 | 0.7.20 | 0.7.21 | 0.7.22 | 0.7.23 | 0.7.24 | 0.7.25 | 0.7.26 | 0.7.27 | 0.7.28 | 1.2.10 | 1.2.11 | 1.2.12 | 1.2.14 | 1.2.15 | 1.2.16 | 1.2.17 | 1.2.18 | 1.2.19 | 1.2.20 | 1.2.21 | 1.2.22 | 1.2.23 | 1.2.24 |
延伸相關外掛(你可能也想知道)
Custom Post Type Permalinks 》自訂文章類型永久連結允許您編輯自訂文章類型的永久連結結構。, 更改自訂分類目錄的永久鏈接,以“example.org/post_type/taxonomy_name/term_slug̶...。
Featured Image from URL (FIFU) 》h3>WordPress 外掛 - 用於顯示外部特色圖片、影片、音訊等等, FIFU 自 2015 年來已幫助全球數千個網站節省了儲存空間、處理時間和版權費用。, 如果您已經厭倦...。
Shortcode Redirect 》這款「Shortcode Redirect」外掛讓網站擁有者在網站的頁面或文章上查看特定的秒數之後,自動將使用者重新導向到其他網站。外掛的使用方式非常簡單,只需在貼...。
URL Params 》URL Params WordPress 插件允許您訪問 URL 中查詢字符串中的 URL 參數。, 這個插件甚至允許您在短代碼中指定一個默認值,如果該參數沒有設置,那麼如果您想說...。
Move Login 》這個外掛可以禁止訪問 https://example.com/wp-login.php,並建立新的 URL,例如 https://example.com/login 或 https://example.com/logout。, 這是防止機器...。
Simple Page Redirect 》這個外掛可以將任何文章/頁面/自訂文章型別/作品集重新導向到任何內部或外部網址。它為所有預設和自訂文章型別的單頁添加了文字選項。, 啟用外掛後,在文章編...。
Root Relative URLs 》這是一個 WordPress 外掛,可將所有 URL 格式轉換為 root-relative URLs,以實現在暫存 / 生產主機環境之間以及在移動設備上進行調試 / 測試時的無縫切換,而...。
Permalink Manager for WooCommerce 》Permalink Manager for WooCommerce旨在提供更美觀的網址,使其更易於閱讀。, 主要優勢, , 使用301狀態重定向重複的頁面, 可獨立配置產品、分類和標籤, 選擇...。
Featured Image by URL 》Featured Image by URL :, Featured Image by URL 允許使用來自外部 URL 的圖片作為您文章、頁面和類似 WooCommerce 產品等自訂文章類型的特色圖片。包括支...。
WP Force Lowercase URLs 》對於所有非管理員的 URL(不包括文件名),將大寫 URL 重定向至小寫版本。, 如有任何錯誤或功能請求,請在以下鏈接回報。, 錯誤:, , 回報位址:Github 問題...。
Bitly's WordPress Plugin 》喜歡使用 WordPress 嗎?還喜歡 Bitly 嗎?安裝這個外掛後,您將能夠縮短連結並從 WordPress 中查看點擊率。您的新連結將保存到 Bitly 中以供參考和深入分析...。
Simple Mobile URL Redirect 》這是一個簡單的行動裝置重導向外掛程式,適用於使用不同網址來呈現行動裝置內容的使用者。只需要輸入完整路徑的網址,即可讓使用者前往行動裝置專屬的內容。。
WP Author Slug 》這個外掛會以使用者顯示名稱的已消毒版本來替換作者標誌。, 這個外掛無法防止駭客找到你的登錄名稱,但登錄名稱不會顯示在作者檔案的 URL 中,並且可以使用顯...。
Smart User Slug Hider 》Smart User Slug Hider 外掛可隱藏作者頁面的使用者名稱,以增強安全性。, 使用方式, 本外掛自動將使用者名稱替代為 16 位元數字代碼字串,不需要任何設定。...。
Permalinks Customizer 》自定義永久網址助手(Permalinks Customizer)可為公開訪問的不同文章類型和分類定義不同的永久網址結構。您可以使用 WordPress 中已定義的標籤,如此處所述...。