Contributors: Toro_Unit, inc2734, ixkaito, keita_kobayashi, strategio
Donate link: https://www.paypal.me/torounit
Tags: permalink, url, link, address, custom post type
Requires at least: 6.1
Tested up to: 6.6
Requires PHP: 7.4
License: GPLv2 or Later
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Stable tag: 3.5.3
Edit the permalink of custom post type.
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
Example:
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);
- Download the custom-post-type-permalinks.zip file to your computer.
- Unzip the file.
- Upload the
custom-post-type-permalinks
directory to your/wp-content/plugins/
directory. - Activate the plugin through the 'Plugins' menu in WordPress.
That's it. You can access the permalinks setting by going to Settings -> Permalinks.
- screenshot-1.png
- Tested WP 6.6
- Fix notices for php 8.
- Tested WP 6.1 / 6.2 / 6.3
- Tested PHP 8.0 / 8.2
- Update test for WP 5.7
- WPML support: Only apply slug translation if post type is supported. (Props @ffauvel)
- Fix archive link bug fix.
- Tested WP 5.6.
- Fix readme.
- Tested 5.5 beta3
- WPML support: custom post type slug translation. ( Props @strategio )
- Add new filter
cptp_post_link_category
andcptp_post_link_term
. - Use Lowercase prefix for action and filter.
- Tested 5.4
- fix CPTP_Module_Permalink::post_type_link.
- Add disable option for date / author and post type archive.
- Bug fix for
parse_request
.
- Fix readme.txt
- 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.
- Test for WordPress 4.9.
- PHPCS fix.
- Test for WordPress 4.8.
- Bug fix for attachment link.
- Bug fix in
CPTP_Module_Setting::upgrader_process_complete
.
- Add filter
CPTP_date_front
. - Fix sort term by
wp_list_sort
.
- Admin notice on update plugin.
- Large bug fix.
- no_taxonomy_structure bug fix.
- Add default value for options.
- add
CPTP_Util::get_no_taxonomy_structure
.
- Set
no_taxonomy_structure
defaulttrue
.
rewirte => false
post type support.
- Create rewrite rule on
registered_post_type
andregistered_taxonomy
action. - Not create taxonomy rewrite rule when
rewrite
isfalse
.
- pointer html bug fix.
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
- Fixed removed parent post problem.
- readme fix.
- Tested for 4.5.
- Add filter
CPTP_set_{$module_name}_module
.
- Fix Translation Problem.
- bugfix
wp_get_archives
.
- bugfix for polylang.
- Add filter
cptp_post_type_link_priority
,cptp_term_link_priority
,cptp_attachment_link_priority
. - Add action
CPTP_registered_modules
.
- WPML Test. thanks keita_kobayashi !
- option bug fix.
- add category rule, if only attached category to post type.
- category slug bug fix.
- 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
Bug Fix.- Bug Fix.
- Use Semantic Versioning.
- Date Structure Fix.
- Use Category Base.
- Adding date slug only conflicting
%post_id%
. - Change taxonomy link rewrite rule. Use
post_type
. - Can change template include custom taxonomy.
- Category and author.
- French Transration. Thanks Geoffrey!
- Hierarchial Term Fix.
- Strict Standard Error Fix.
- archive link bug fix.
- Tested Up 3.9
- “/”bug fix.
- taxonomy tmplate bug fix.
- Archives Rewrite Fix.
- Admin Bug Fix.
- Big change plugin architecture.
- Show
has_archive
,with_front
.
- Internal release.
has_archive
Bug Fix.- Fixed a bug in the link, including the extension.
wp_get_archives
Bug Fix.
- Tested 3.6
- Bug Fix.
- Admin page fix.
- slngle pageing link fix.
- Add Russian translation.
- Add custom post type archive only
has_archive
istrue
. - Change method name.
- Change hook custom post link.
- Use Slug in
wp_get_archive()
. - Fix attachment link.
- Translate Bug Fix.
- Paging Bug Fix.
- Commnent Paging.
- Show pointer.
- Bug Fix.
- Support Comment permalink.
- Small change in setting page.
- Change default value.
- Bug Fix.
- Bug fix.
- Bug fix.
- Add parent's slug to hierarchical post type.
- Add ability to disable to change custom taxonomy archive's permalink.
- Bug fix taxonomy rewrite.
- Changed part for saving the data.
- Reweite bug fix.
- Prewview bug fix.
- Bug fix.
- Add
%{taxonomy}%
tag. - A large number of Bug Fix.
- Change Setting Page. Use Setting API.
- Fix
%author%
tag.
- First release on wordpress.org