plugin-icon

Custom Post Type Permalinks

編輯自訂內容類型永久連結。
評價
4.8/5
版本
3.5.3
活躍安裝總數
200K
最近更新:
Oct 10, 2024
Custom Post Type Permalinks

Custom Post Type Permalinks 能讓網站管理員編輯自訂內容類型的永久連結結構。

這個外掛可以將分類法彙整頁面的永久連結變更為 example.org/post_type/taxonomy_name/term_slug,也能停用這項功能。

同時也支援 wp_get_archives( 'post_type=foo' ) 及內容類型日期彙整 (例如 example.com/post_type_slug/date/2010/01/01)。

這個外掛在 GitHub 存放庫上進行開發。

贊助外掛開發:請購買 Amazon 願望清單中的商品,或是透過 PayPal 贊助。

本地化人員

其他外掛

使用程式碼設定

範例程式碼:

register_post_type( 'foo', array( 'public' => true, 'has_archive' => true, 'rewrite' => array( "with_front" => true ), 'cptp_permalink_structure' => '%post_id%' ) );

排除指定內容類型

add_filter( 'cptp_is_rewrite_supported_by_foo', '__return_false' ); // or add_filter( 'cptp_is_rewrite_supported', function ( $support , $post_type ) { if ( 'foo' === $post_type ) { return false; } return $support; }, 10, 2);
免費使用Business方案
目前已測試版本
WordPress 6.6.4
此外掛程式已可供下載,並可用於你 系統。