説明
Custom Post Type Permalinks はカスタム投稿タイプのパーマリンク設定を編集可能にします。
Change custom taxonomy archive’s permalink to “example.org/post_type/taxonomy_name/term_slug”. Can disable this fix.
And support wp_get_archives( 'post_type=foo' )
and post type date archive (ex. example.com/post_type_slug/date/2010/01/01
).
Donation: Please send My Wishlist or Paypal
翻訳者
- 日本語(ja) – Toro_Unit
- フランス語(fr_FR) – Geoffrey Crofte
- ロシア語 – Olart, Natali_Z
Also checkout
コードでの設定
例:
register_post_type( 'foo', array( 'public' => true, 'has_archive' => true, 'rewrite' => array( "with_front" => true ), 'cptp_permalink_structure' => '%post_id%' ) );
Exclude specific post type
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);
インストール
- custom-post-type-permalinks.zip をダウンロードしてください。
- ファイルを解凍します。
custom-post-type-permalinks
ディレクトリを/wp-content/plugins/
にアップロードします。- 「プラグイン」メニューからプラグインを有効化します。
設定 -> パーマリンク のページへ行くことでパーマリンク設定をすることが出来ます.
評価
貢献者と開発者
Custom Post Type Permalinks はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。
貢献者変更履歴
3.4.5
- Update test for WP 5.7
3.4.4
- WPML support: Only apply slug translation if post type is supported. (Props @ffauvel)
3.4.3
- Fix archive link bug fix.
3.4.2
- Tested WP 5.6.
3.4.1
- Fix readme.
3.4.0
- Tested 5.5 beta3
- WPML support: custom post type slug translation. ( Props @strategio )
- 新規フィルター
cptp_post_link_category
とcptp_post_link_term
を追加。 - Use Lowercase prefix for action and filter.
3.3.5
- Tested 5.4
- fix CPTP_Module_Permalink::post_type_link.
3.3.1
- Add disable option for date / author and post type archive.
- Bug fix for
parse_request
.
3.2.2
- Fix readme.txt
3.2.0
- Support only public post type.
- Add
CPTP_is_rewrite_supported_by_${post_type}
andCPTP_is_rewrite_supported
filter. - Remove post_type query wp_get_archives.
3.1.4
- WordPress 4.9 でのテスト
- PHPCS に関わる修正。
3.1.3
- WordPress 4.8 でのテスト。
- 添付ファイルへのリンクのバグを修正。
3.1.1
- Bug fix in
CPTP_Module_Setting::upgrader_process_complete
.
3.1.0
- フィルター
CPTP_date_front
を追加。 wp_list_sort
によるタームの並べ替えを修正
3.0.0
- プラグイン更新時に管理画面に警告を表示。
- 大きなバグ修正。
- no_taxonomy_structure のバグを修正。
- オプションにデフォルト値を追加。
2.2.0
CPTP_Util::get_no_taxonomy_structure
を追加
2.1.3
- Set
no_taxonomy_structure
defaulttrue
.
2.1.2
rewirte => false
投稿タイプのサポート。
2.1.0
- Create rewrite rule on
registered_post_type
andregistered_taxonomy
action. - Not create taxonomy rewrite rule when
rewrite
isfalse
.
2.0.2
- pointer html bug fix.
2.0.0
add_rewrite_rules
onwp_loaded
priority is changed 10 from 100. fix issue #53- Replace
wp_get_post_terms
byget_the_terms
. fix issue #55 - Fix bug
register_uninstall_hook
called twice on each page. fix issue #56
1.5.4
- Fixed removed parent post problem.
1.5.3
- readme fix.
1.5.0
- Tested for 4.5.
- フィルター
CPTP_set_{$module_name}_module
を追加。
1.4.0
- Fix Translation Problem.
1.3.1
- bugfix
wp_get_archives
.
1.3.0
- bugfix for polylang.
1.2.0
- フィルター
cptp_post_type_link_priority
、cptp_term_link_priority
、cptp_attachment_link_priority
を追加。 - Add action
CPTP_registered_modules
.
1.1.0
- WPML Test. thanks keita_kobayashi !
1.0.5
1.0.4
- option bug fix.
1.0.3
- add category rule, if only attached category to post type.
1.0.2
- カテゴリースラッグのバグを修正。
1.0.0
- Set Permalink enable
register_post_type
. - Enable add post type query to taxonomy archives.
- Use Class Autoloader.
- Create Rewrite Rule on
wp_loaded
action. - WordPress Code Format Fix.
CPTP_Module_Permalink
バグ修正。- バグ修正。
- セマンティックバージョニングを使用。
- Date Structure Fix.
- Use Category Base.
0.9.7
- Adding date slug only conflicting
%post_id%
. - Change taxonomy link rewrite rule. Use
post_type
. - Can change template include custom taxonomy.
0.9.6
- Category and author.
- French Transration. Thanks Geoffrey!
- Hierarchial Term Fix.
0.9.5.6
- Strict Standard Error Fix.
0.9.5.4
- archive link bug fix.
- 3.9 以上でのテスト。
0.9.5.3
- “/” のバグを修正。
- taxonomy tmplate bug fix.
0.9.5.2
- Archives Rewrite Fix.
0.9.5.1
- Admin Bug Fix.
0.9.5
- Big change plugin architecture.
- Show
has_archive
,with_front
.
0.9.4
- Internal release.
0.9.3.3
has_archive
バグ修正。- Fixed a bug in the link, including the extension.
0.9.3.2
wp_get_archives
バグ修正。
0.9.3.1
- Tested 3.6
- バグ修正。
0.9.3
- Admin page fix.
- slngle pageing link fix.
- ロシア語翻訳を追加。
0.9
- カスタム投稿タイプアーカイブを
has_archive
がtrue
の時のみ追加。 - Change method name.
- Change hook custom post link.
- Use Slug in
wp_get_archive()
. - 添付ファイルリンクを修正。
0.8.7
- Translate Bug Fix.
0.8.6
- Paging Bug Fix.
- Commnent Paging.
- Show pointer.
0.8.1
- バグ修正。
0.7.9.1
- Support Comment permalink.
- Small change in setting page.
- Change default value.
- バグ修正。
0.7.8
- バグ修正。
0.7.7
- バグ修正。
0.7.6
- 階層的な投稿タイプに親のスラッグを追加。
0.7.5
- Add ability to disable to change custom taxonomy archive’s permalink.
0.7.4
- Bug fix taxonomy rewrite.
0.7.3
- Changed part for saving the data.
0.7.2
- Reweite bug fix.
- Prewview bug fix.
0.7.1
- バグ修正。
0.7
%{taxonomy}%
タグを追加。- 多数のバグ修正。
- Change Setting Page. Use Setting API.
0.6.2
- Fix
%author%
tag.
0.6
- First release on wordpress.org