PHPackages                             torounit/custom-post-type-permalinks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. torounit/custom-post-type-permalinks

ActiveWordpress-plugin

torounit/custom-post-type-permalinks
====================================

Edit the permalink of custom post type !

3.5.3(1y ago)1814.1k↓50%47[31 issues](https://github.com/torounit/custom-post-type-permalinks/issues)GPL-2.0+PHPPHP &gt;=7.4CI passing

Since Jul 4Pushed 1mo ago6 watchersCompare

[ Source](https://github.com/torounit/custom-post-type-permalinks)[ Packagist](https://packagist.org/packages/torounit/custom-post-type-permalinks)[ GitHub Sponsors](https://github.com/torounit)[ RSS](/packages/torounit-custom-post-type-permalinks/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (40)Used By (0)

Custom Post Type Permalinks
===========================

[](#custom-post-type-permalinks)

Contributors: Toro\_Unit, inc2734, ixkaito, keita\_kobayashi, strategio
Donate link:
Tags: permalink, url, link, address, custom post type
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 8.0
License: GPLv2 or Later
License URI:
Stable tag: 3.5.4

Edit the permalink of custom post type.

[![Latest Stable Version](https://camo.githubusercontent.com/ae546b88ca24769d0c06ea4fac1143f3cfd1e9eab93322c20d1e1c7cb2c69dec/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f762f637573746f6d2d706f73742d747970652d7065726d616c696e6b733f7374796c653d666f722d7468652d6261646765)](https://wordpress.org/plugins/custom-post-type-permalinks/)[![License](https://camo.githubusercontent.com/d4d243a1334fc6ca687e47f9ca9cbe9e33e5ca259bf3c771833ffc6c4185d354/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f746f726f756e69742f637573746f6d2d706f73742d747970652d7065726d616c696e6b733f7374796c653d666f722d7468652d6261646765)](https://github.com/torounit/custom-post-type-permalinks/blob/main/LICENSE)[![Downloads](https://camo.githubusercontent.com/c33e71e877a4d172cfa6b001839897715833ebe8f43d6e1124b2696ca78255c7/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f64742f637573746f6d2d706f73742d747970652d7065726d616c696e6b732e7376673f7374796c653d666f722d7468652d6261646765)](https://wordpress.org/plugins/custom-post-type-permalinks/)[![Tested up](https://camo.githubusercontent.com/79a3c5e0f100be5faa2d60416ca3ee1fa0af64b9e8ed1c9f48a43e0781eed629/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f762f637573746f6d2d706f73742d747970652d7065726d616c696e6b732e7376673f7374796c653d666f722d7468652d6261646765)](https://wordpress.org/plugins/custom-post-type-permalinks/)[![wp.org rating](https://camo.githubusercontent.com/66d2017aca14d9b94016616e7be8751b1bd18c0b02a50a607b43bdf58cf1f81b/68747470733a2f2f696d672e736869656c64732e696f2f776f726470726573732f706c7567696e2f722f637573746f6d2d706f73742d747970652d7065726d616c696e6b732e7376673f7374796c653d666f722d7468652d6261646765)](https://wordpress.org/plugins/custom-post-type-permalinks/)[![GitHub Workflow Status](https://camo.githubusercontent.com/8a3d73dfe8b508d997358f379ec701c15da51efaced6e7308d9c1485aebce9d5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f726f756e69742f637573746f6d2d706f73742d747970652d7065726d616c696e6b732f746573742d616e642d72656c656173652e796d6c3f6272616e63683d6d61696e267374796c653d666f722d7468652d6261646765)](https://github.com/torounit/custom-post-type-permalinks/actions)

[![](https://camo.githubusercontent.com/de94381c3a7c0ea0462b46fbf1e12aaff4e7ba4588bd02409f9d155acbfcf77b/68747470733a2f2f70732e772e6f72672f637573746f6d2d706f73742d747970652d7065726d616c696e6b732f6173736574732f62616e6e65722d31353434783530302e706e673f7265763d31303434333335)](https://wordpress.org/plugins/custom-post-type-permalinks/)

Description
-----------

[](#description)

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.](https://github.com/torounit/custom-post-type-permalinks)

Donation: Please send [My Wishlist](http://www.amazon.co.jp/registry/wishlist/COKSXS25MVQV) or [Paypal](https://www.paypal.me/torounit)

### Translators

[](#translators)

- Japanese(ja) - [Toro\_Unit](http://www.torounit.com/)
- French(fr\_FR) - [Geoffrey Crofte](http://geoffrey.crofte.fr/)
- Russian(ru\_RU) - [Olart](http://olart.ru), [Natali\_Z](https://profiles.wordpress.org/natali_z)

### Also checkout

[](#also-checkout)

- [Simple Post Type Permalinks](https://wordpress.org/plugins/simple-post-type-permalinks/)

Setting on Code
---------------

[](#setting-on-code)

Example:

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

### Exclude specific post type

[](#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);
```

Installation
------------

[](#installation)

- 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 -&gt; Permalinks*.

Screenshots
-----------

[](#screenshots)

- screenshot-1.png

Changelog
---------

[](#changelog)

### 3.5.4

[](#354)

- Tested WP 6.9

### 3.5.3

[](#353)

- Tested WP 6.6
- Fix notices for php 8.

### 3.5.0

[](#350)

- Tested WP 6.1 / 6.2 / 6.3
- Tested PHP 8.0 / 8.2

### 3.4.5

[](#345)

- Update test for WP 5.7

### 3.4.4

[](#344)

- WPML support: Only apply slug translation if post type is supported. (Props @ffauvel)

### 3.4.3

[](#343)

- Fix archive link bug fix.

### 3.4.2

[](#342)

- Tested WP 5.6.

### 3.4.1

[](#341)

- Fix readme.

### 3.4.0

[](#340)

- Tested 5.5 beta3
- WPML support: custom post type slug translation. ( Props @strategio )
- Add new filter `cptp_post_link_category` and `cptp_post_link_term` .
- Use Lowercase prefix for action and filter.

### 3.3.5

[](#335)

- Tested 5.4
- fix CPTP\_Module\_Permalink::post\_type\_link.

### 3.3.1

[](#331)

- Add disable option for date / author and post type archive.
- Bug fix for `parse_request`.

### 3.2.2

[](#322)

- Fix readme.txt

### 3.2.0

[](#320)

- Support only public post type.
- Add `CPTP_is_rewrite_supported_by_${post_type}` and `CPTP_is_rewrite_supported` filter.
- Remove post\_type query wp\_get\_archives.

### 3.1.4

[](#314)

- Test for WordPress 4.9.
- PHPCS fix.

### 3.1.3

[](#313)

- Test for WordPress 4.8.
- Bug fix for attachment link.

### 3.1.1

[](#311)

- Bug fix in `CPTP_Module_Setting::upgrader_process_complete`.

### 3.1.0

[](#310)

- Add filter `CPTP_date_front`.
- Fix sort term by `wp_list_sort` .

### 3.0.0

[](#300)

- Admin notice on update plugin.
- Large bug fix.
- no\_taxonomy\_structure bug fix.
- Add default value for options.

### 2.2.0

[](#220)

- add `CPTP_Util::get_no_taxonomy_structure`.

### 2.1.3

[](#213)

- Set `no_taxonomy_structure` default `true`.

### 2.1.2

[](#212)

- `rewirte => false` post type support.

### 2.1.0

[](#210)

- Create rewrite rule on `registered_post_type` and `registered_taxonomy` action.
- Not create taxonomy rewrite rule when `rewrite` is `false`.

### 2.0.2

[](#202)

- pointer html bug fix.

### 2.0.0

[](#200)

- `add_rewrite_rules` on `wp_loaded` priority is changed 10 from 100. [fix issue #53](https://github.com/torounit/custom-post-type-permalinks/issues/53)
- Replace `wp_get_post_terms` by `get_the_terms`. [fix issue #55](https://github.com/torounit/custom-post-type-permalinks/issues/55)
- Fix bug `register_uninstall_hook` called twice on each page. [fix issue #56](https://github.com/torounit/custom-post-type-permalinks/issues/56)

### 1.5.4

[](#154)

- Fixed removed parent post problem.

### 1.5.3

[](#153)

- readme fix.

### 1.5.0

[](#150)

- Tested for 4.5.
- Add filter `CPTP_set_{$module_name}_module`.

### 1.4.0

[](#140)

- Fix Translation Problem.

### 1.3.1

[](#131)

- bugfix `wp_get_archives`.

### 1.3.0

[](#130)

- bugfix for polylang.

### 1.2.0

[](#120)

- Add filter `cptp_post_type_link_priority`, `cptp_term_link_priority`, `cptp_attachment_link_priority`.
- Add action `CPTP_registered_modules`.

### 1.1.0

[](#110)

- WPML Test. thanks [keita\_kobayashi](https://profiles.wordpress.org/keita_kobayashi) !

### 1.0.5

[](#105)

- admin bug fix. thanks [ixkaito](https://profiles.wordpress.org/ixkaito) !
- Translation Update Thanks [Natali\_Z](https://profiles.wordpress.org/natali_z) !

### 1.0.4

[](#104)

- option bug fix.

### 1.0.3

[](#103)

- add category rule, if only attached category to post type.

### 1.0.2

[](#102)

- category slug bug fix.

### 1.0.0

[](#100)

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

### 0.9.7

[](#097)

- Adding date slug only conflicting `%post_id%`.
- Change taxonomy link rewrite rule. Use `post_type`.
- Can change template include custom taxonomy.

### 0.9.6

[](#096)

- Category and author.
- French Transration. Thanks Geoffrey!
- Hierarchial Term Fix.

### 0.9.5.6

[](#0956)

- Strict Standard Error Fix.

### 0.9.5.4

[](#0954)

- archive link bug fix.
- Tested Up 3.9

### 0.9.5.3

[](#0953)

- “/”bug fix.
- taxonomy tmplate bug fix.

### 0.9.5.2

[](#0952)

- Archives Rewrite Fix.

### 0.9.5.1

[](#0951)

- Admin Bug Fix.

### 0.9.5

[](#095)

- Big change plugin architecture.
- Show `has_archive`, `with_front`.

### 0.9.4

[](#094)

- Internal release.

### 0.9.3.3

[](#0933)

- `has_archive` Bug Fix.
- Fixed a bug in the link, including the extension.

### 0.9.3.2

[](#0932)

- `wp_get_archives` Bug Fix.

### 0.9.3.1

[](#0931)

- Tested 3.6
- Bug Fix.

### 0.9.3

[](#093)

- Admin page fix.
- slngle pageing link fix.
- Add Russian translation.

### 0.9

[](#09)

- Add custom post type archive only `has_archive` is `true`.
- Change method name.
- Change hook custom post link.
- Use Slug in `wp_get_archive()`.
- Fix attachment link.

### 0.8.7

[](#087)

- Translate Bug Fix.

### 0.8.6

[](#086)

- Paging Bug Fix.
- Commnent Paging.
- Show pointer.
-

### 0.8.1

[](#081)

- Bug Fix.

### 0.7.9.1

[](#0791)

- Support Comment permalink.
- Small change in setting page.
- Change default value.
- Bug Fix.

### 0.7.8

[](#078)

- Bug fix.

### 0.7.7

[](#077)

- Bug fix.

### 0.7.6

[](#076)

- Add parent's slug to hierarchical post type.

### 0.7.5

[](#075)

- Add ability to disable to change custom taxonomy archive's permalink.

### 0.7.4

[](#074)

- Bug fix taxonomy rewrite.

### 0.7.3

[](#073)

- Changed part for saving the data.

### 0.7.2

[](#072)

- Reweite bug fix.
- Prewview bug fix.

### 0.7.1

[](#071)

- Bug fix.

### 0.7

[](#07)

- Add `%{taxonomy}%` tag.
- A large number of Bug Fix.
- Change Setting Page. Use Setting API.

### 0.6.2

[](#062)

- Fix `%author%` tag.

### 0.6

[](#06)

- First release on wordpress.org

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance68

Regular maintenance activity

Popularity39

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 96.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~88 days

Recently: every ~292 days

Total

35

Last Release

576d ago

Major Versions

2.2.0 → 3.0.02017-02-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/b1738118b1515a2c312e90b71dc041a57a90db61144063f36de6b27587b507d6?d=identicon)[torounit](/maintainers/torounit)

---

Top Contributors

[![torounit](https://avatars.githubusercontent.com/u/1908815?v=4)](https://github.com/torounit "torounit (644 commits)")[![tristanleboss](https://avatars.githubusercontent.com/u/1431508?v=4)](https://github.com/tristanleboss "tristanleboss (3 commits)")[![maiko-ampersand](https://avatars.githubusercontent.com/u/4299296?v=4)](https://github.com/maiko-ampersand "maiko-ampersand (2 commits)")[![mseymour](https://avatars.githubusercontent.com/u/188480?v=4)](https://github.com/mseymour "mseymour (2 commits)")[![ecoad](https://avatars.githubusercontent.com/u/596528?v=4)](https://github.com/ecoad "ecoad (2 commits)")[![ixkaito](https://avatars.githubusercontent.com/u/5457539?v=4)](https://github.com/ixkaito "ixkaito (1 commits)")[![jarednova](https://avatars.githubusercontent.com/u/1298086?v=4)](https://github.com/jarednova "jarednova (1 commits)")[![JulienMelissas](https://avatars.githubusercontent.com/u/2278221?v=4)](https://github.com/JulienMelissas "JulienMelissas (1 commits)")[![baden03](https://avatars.githubusercontent.com/u/835758?v=4)](https://github.com/baden03 "baden03 (1 commits)")[![KoenRijpstra](https://avatars.githubusercontent.com/u/579455?v=4)](https://github.com/KoenRijpstra "KoenRijpstra (1 commits)")[![ramon-villain](https://avatars.githubusercontent.com/u/1520006?v=4)](https://github.com/ramon-villain "ramon-villain (1 commits)")[![robbierotman](https://avatars.githubusercontent.com/u/3107546?v=4)](https://github.com/robbierotman "robbierotman (1 commits)")[![sectsect](https://avatars.githubusercontent.com/u/5554826?v=4)](https://github.com/sectsect "sectsect (1 commits)")[![strategio](https://avatars.githubusercontent.com/u/1941656?v=4)](https://github.com/strategio "strategio (1 commits)")[![keichan34](https://avatars.githubusercontent.com/u/1064513?v=4)](https://github.com/keichan34 "keichan34 (1 commits)")[![bronsonoquinn](https://avatars.githubusercontent.com/u/31824716?v=4)](https://github.com/bronsonoquinn "bronsonoquinn (1 commits)")[![DragosMocrii](https://avatars.githubusercontent.com/u/1543960?v=4)](https://github.com/DragosMocrii "DragosMocrii (1 commits)")[![geoffreycrofte](https://avatars.githubusercontent.com/u/452767?v=4)](https://github.com/geoffreycrofte "geoffreycrofte (1 commits)")[![inc2734](https://avatars.githubusercontent.com/u/1094306?v=4)](https://github.com/inc2734 "inc2734 (1 commits)")

---

Tags

custom-post-typespermalinkwordpress-plugin

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/torounit-custom-post-type-permalinks/health.svg)

```
[![Health](https://phpackages.com/badges/torounit-custom-post-type-permalinks/health.svg)](https://phpackages.com/packages/torounit-custom-post-type-permalinks)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
