Custom Post Type Permalinks WordPress 插件

Custom Post Type Permalinks WordPress 插件

描述

Custom Post Type Permalinks allow you edit the permalink structure of custom post type.

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 ).

This Plugin published on GitHub.

Donation: Please send My Wishlist or Paypal

译:

  • Japanese(ja) – Toro_Unit
  • French(fr_FR) – Geoffrey Crofte
  • Russian(ru_RU) – Olart, Natali_Z

Also checkout

  • Simple Post Type Permalinks

Setting on Code

如:

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' );// oradd_filter(  'cptp_is_rewrite_supported', function ( $support , $post_type ) {    if ( 'foo' === $post_type ) {        return false;    }    return $support;}, 10, 2);

相关推荐

发表回复

房先生
我们将24小时内回复。
2024-10-01 16:24:49
您好,有任何疑问请与我们联系!
您的工单我们已经收到,我们将会尽快跟您联系!
[加我微信]
chaoneo
注:点击复制微信号并打开微信APP,添加好友后进行聊天。
[电话联系]
13585372227
[电子邮件]
chaoneo@163.com
取消

选择聊天工具: