[WordPress] 外掛分享: Custom Permalink Editor

首頁外掛目錄 › Custom Permalink Editor
WordPress 外掛 Custom Permalink Editor 的封面圖片
3,000+
安裝啟用
★★★★★
5/5 分(2 則評價)
84 天前
最後更新
問題解決
WordPress 5.4+ PHP 7.4+ v1.0.6 上架:2021-11-03

內容簡介

這個外掛是由 Team KCG 開發,用來更改文章、頁面和自訂文章的 URL。
這個外掛允許您編輯文章、頁面和自訂文章的永久連結。
這個外掛不會更改佈景主題預設的永久連結結構。
您必須手動編輯每一篇文章/頁面並編輯永久連結。
如果您卸載這個外掛,您的文章將會回復到預設的永久連結。

免費外掛支援

如果您需要任何自訂修改或有任何疑問、意見或只是想與我們聯繫,請使用我們的聯繫表格。

隱私政策

這個外掛不會收集任何使用者資訊。
如果您需要任何自訂修改或有任何事情,請聯繫 https://kingscrestglobal.com/,並提及自訂永久連結編輯器。

篩選器
在 `$_SERVER` 變數中新增 `PATH_INFO`

```add_filter( 'cp_editor_path_info', '__return_true' );```

排除永久連結
要排除任何永久連結免於被外掛處理,請加入下列篩選器:

function team_kcg_exclude_permalink( $permalink ) {
if ( false !== strpos( $permalink, 'sitemap.xml' ) ) {
return '__true';
}

return;
}
add_filter( 'cp_editor_exclude_permalink', 'team_kcg_exclude_permalink' );

排除文章類型
要將自訂永久連結編輯器排除在任何文章類型之外,請加入下列篩選器:

function team_kcg_exclude_post_type( $post_type ) {
// 將 'custompost' 換成您的文章類型名稱
if ( 'custompost' === $post_type ) {
return '__true';
}

return '__false';
}
add_filter( 'cp_editor_exclude_post_type', 'team_kcg_exclude_post_type' );

排除文章
要排除任何文章免於被自訂永久連結編輯器處理 (根據 ID、模板等),請加入下列篩選器:

function team_kcg_exclude_posts( $post ) {
if ( 1557 === $post->ID ) {
return true;
}

return false;
}
add_filter( 'cp_editor_exclude_posts', 'team_kcg_exclude_posts' );

允許重音字母
要允許重音字母,請在您的主題 functions.php 中加入以下內容:

function team_kcg_allow_caps() {
return true;
}
add_filter( 'cp_editor_allow_accents', 'team_kcg_allow_caps' );

感謝支援
使用方法

您可以按照以下步驟更改永久連結:

編輯您的文章/頁面並創建 SEO 友好的自訂 URL。
在永久連結框中插入您想要的永久連結並更新文章。
預覽您的文章,看看文章的 URL 是否已更改。
如果您想要恢復到 WordPress 預設的 URL 系統,只需停用外掛即可。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.6) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Custom Permalink Editor」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Custom Permalink Editor is a powerful yet simple plugin that allows you to create SEO-friendly custom URLs for your WordPress posts and pages. Perfect for content creators, marketers, and site owners who want complete control over their permalink structure.
Key Features:
✓ Easy Permalink Customization – Change URLs for individual posts and pages with just a few clicks
✓ SEO-Friendly URLs – Create clean, readable URLs that improve your search engine rankings
✓ No Global Changes – Customize permalinks per post/page without affecting your site’s default permalink structure
✓ Safe & Reversible – Deactivating the plugin reverts all posts back to their default WordPress permalinks
✓ Categories & Tags Support – Edit permalinks for categories and tags as well
✓ Custom Post Type Support – Existing custom permalinks for custom post types continue to work (Pro version required for editing)
How It Works:

Install and activate the plugin
Edit any post or page
Find the Custom Permalink Editor box
Enter your desired custom URL
Save and publish – your new permalink is live!

Perfect For:

Blog posts with specific keyword requirements
Landing pages with marketing-friendly URLs
Portfolio items with branded permalinks
Product pages with clean, memorable URLs
Migrating content from other platforms while maintaining URL structure

Support
Need help or have questions? We’re here to assist you!

Support Requests: Use our contact form for technical support
Custom Modifications: Contact us for any custom development needs
Feedback: We value your feedback and suggestions for improvements
Pro Version: Interested in premium features? Get in touch

Privacy Policy

This plugin does not collect any user Information
If you need any custom modification or any other thing contact with https://kingscrestglobal.com/ and mention Custom Permalink Editor

Advanced Filters
For developers who need more control, Custom Permalink Editor provides several filters to customize its behavior.
Add PATH_INFO in $_SERVER Variable
Enable PATH_INFO support in the $_SERVER variable. This is useful for certain server configurations.
Usage:
add_filter( 'cp_editor_path_info', '__return_true' );

Exclude Specific Permalinks
Prevent specific permalinks from being processed by the plugin. Useful for excluding system files like sitemaps or special pages.
Example: Exclude sitemap.xml from processing
function team_kcg_exclude_permalink( $permalink ) {
// Check if permalink contains 'sitemap.xml'
if ( false !== strpos( $permalink, 'sitemap.xml' ) ) {
return '__true';
}

return;
}
add_filter( 'cp_editor_exclude_permalink', 'team_kcg_exclude_permalink' );

Exclude Specific Post Types
Remove the Custom Permalink Editor form from specific post types. Helpful if you want to disable the feature for certain content types.
Example: Exclude a custom post type called ‘custompost’
function team_kcg_exclude_post_type( $post_type ) {
// Replace 'custompost' with your actual post type name
if ( 'custompost' === $post_type ) {
return '__true';
}

return '__false';
}
add_filter( 'cp_editor_exclude_post_type', 'team_kcg_exclude_post_type' );

Exclude Specific Posts
Exclude individual posts or pages from showing the Custom Permalink Editor form. You can filter by ID, template, or any post property.
Example: Exclude post with ID 1557
function team_kcg_exclude_posts( $post ) {
// Exclude specific post by ID
if ( 1557 === $post->ID ) {
return true;
}

// You can also exclude by other criteria
// Example: Exclude posts with a specific template
// if ( get_page_template_slug( $post->ID ) === 'template-landing.php' ) {
// return true;
// }

return false;
}
add_filter( 'cp_editor_exclude_posts', 'team_kcg_exclude_posts' );

Allow Accented Characters
By default, the plugin removes accents from permalinks for better URL compatibility. Enable this filter if you need to preserve accented characters.
Usage:
function team_kcg_allow_accents() {
return true;
}
add_filter( 'cp_editor_allow_accents', 'team_kcg_allow_accents' );

Allow Capital Letters
By default, permalinks are converted to lowercase. Use this filter to preserve capital letters in your custom URLs.
Usage:
function team_kcg_allow_capitals() {
return true;
}
add_filter( 'cp_editor_allow_caps', 'team_kcg_allow_capitals' );

Note: Add these code snippets to your theme’s functions.php file or use a custom plugin/code snippets plugin.
How To Use
Changing a Post or Page Permalink:

Navigate to Posts > All Posts (or Pages > All Pages)
Click on the post/page you want to edit
Scroll down to find the “Custom Permalink Editor” meta box
Enter your desired custom URL in the text field (without the domain)
Click “Update” or “Publish” to save your changes
Visit your post to see the new permalink in action!

Example:
– Default URL: yoursite.com/2026/01/11/my-blog-post/
– Custom URL: yoursite.com/seo-friendly-custom-url/
Reverting to Default Permalinks:
Simply deactivate the plugin and all posts will automatically revert to WordPress default permalink structure.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon