custom-post-type-permalinks
Last commit date
CPTP
6 years ago
assets
8 years ago
language
8 years ago
.rsyncignore
6 years ago
CONTRIBUTING.md
9 years ago
CPTP.php
6 years ago
LICENSE
9 years ago
custom-post-type-permalinks.php
6 years ago
docker-compose.yml
6 years ago
readme.md
7 years ago
readme.txt
6 years ago
screenshot-1.png
14 years ago
readme.md
352 lines
| 1 | # Custom Post Type Permalinks |
| 2 | |
| 3 | Edit the permalink of custom post type. |
| 4 | |
| 5 | |
| 6 | [](https://packagist.org/packages/torounit/custom-post-type-permalinks](https://packagist.org/packages/torounit/custom-post-type-permalinks](https://packagist.org/packages/torounit/custom-post-type-permalinks) |
| 7 | [](https://packagist.org/packages/torounit/custom-post-type-permalinks](https://packagist.org/packages/torounit/custom-post-type-permalinks](https://packagist.org/packages/torounit/custom-post-type-permalinks) |
| 8 | [](https://wordpress.org/plugins/custom-post-type-permalinks/](https://wordpress.org/plugins/custom-post-type-permalinks/](https://wordpress.org/plugins/custom-post-type-permalinks/) |
| 9 | [](https://wordpress.org/plugins/custom-post-type-permalinks/](https://wordpress.org/plugins/custom-post-type-permalinks/](https://wordpress.org/plugins/custom-post-type-permalinks/) |
| 10 | [](https://wordpress.org/plugins/custom-post-type-permalinks/](https://wordpress.org/plugins/custom-post-type-permalinks/](https://wordpress.org/plugins/custom-post-type-permalinks/) |
| 11 | [](https://travis-ci.org/torounit/custom-post-type-permalinks](https://travis-ci.org/torounit/custom-post-type-permalinks](https://travis-ci.org/torounit/custom-post-type-permalinks) |
| 12 | [](https://www.paypal.me/torounit](https://www.paypal.me/torounit](https://www.paypal.me/torounit) |
| 13 | |
| 14 | [](https://wordpress.org/plugins/custom-post-type-permalinks/](https://wordpress.org/plugins/custom-post-type-permalinks/](https://wordpress.org/plugins/custom-post-type-permalinks/) |
| 15 | |
| 16 | ## Description |
| 17 | |
| 18 | Custom Post Type Permalinks allow you edit the permalink structure of custom post type. |
| 19 | |
| 20 | Change custom taxonomy archive's permalink to "example.org/post_type/taxonomy_name/term_slug". Can disable this fix. |
| 21 | |
| 22 | And support `wp_get_archives( 'post_type=foo' )`. |
| 23 | |
| 24 | [](https://github.com/torounit/custom-post-type-permalinksThis Plugin published on GitHub.](https://github.com/torounit/custom-post-type-permalinks](https://github.com/torounit/custom-post-type-permalinks) |
| 25 | |
| 26 | Donation: Please send [](http://www.amazon.co.jp/registry/wishlist/COKSXS25MVQVMy Wishlist](http://www.amazon.co.jp/registry/wishlist/COKSXS25MVQV](http://www.amazon.co.jp/registry/wishlist/COKSXS25MVQV) or [](https://www.paypal.me/torounitPaypal](https://www.paypal.me/torounit](https://www.paypal.me/torounit) |
| 27 | |
| 28 | |
| 29 | ### Translators |
| 30 | |
| 31 | * Japanese(ja) - [](http://www.torounit.com/Toro_Unit](http://www.torounit.com/](http://www.torounit.com/) |
| 32 | * French(fr_FR) - [](http://geoffrey.crofte.fr/Geoffrey Crofte](http://geoffrey.crofte.fr/](http://geoffrey.crofte.fr/) |
| 33 | * Russian(ru_RU) - [](http://olart.ruOlart](http://olart.ru](http://olart.ru), [](https://profiles.wordpress.org/natali_zNatali_Z](https://profiles.wordpress.org/natali_z](https://profiles.wordpress.org/natali_z) |
| 34 | |
| 35 | ### Also checkout |
| 36 | |
| 37 | * [](https://wordpress.org/plugins/simple-post-type-permalinks/Simple Post Type Permalinks](https://wordpress.org/plugins/simple-post-type-permalinks/](https://wordpress.org/plugins/simple-post-type-permalinks/) |
| 38 | |
| 39 | |
| 40 | ## Setting on Code |
| 41 | |
| 42 | Example: |
| 43 | |
| 44 | ```php |
| 45 | register_post_type( 'foo', |
| 46 | array( |
| 47 | 'public' => true, |
| 48 | 'has_archive' => true, |
| 49 | 'rewrite' => array( |
| 50 | "with_front" => true |
| 51 | ), |
| 52 | 'cptp_permalink_structure' => '%post_id%' |
| 53 | ) |
| 54 | ); |
| 55 | ``` |
| 56 | |
| 57 | |
| 58 | ## Installation |
| 59 | |
| 60 | * Download the custom-post-type-permalinks.zip file to your computer. |
| 61 | * Unzip the file. |
| 62 | * Upload the `custom-post-type-permalinks` directory to your `/wp-content/plugins/` directory. |
| 63 | * Activate the plugin through the 'Plugins' menu in WordPress. |
| 64 | |
| 65 | That's it. You can access the permalinks setting by going to *Settings -> Permalinks*. |
| 66 | |
| 67 | |
| 68 | ## Screenshots |
| 69 | |
| 70 | * screenshot-1.png |
| 71 | |
| 72 | |
| 73 | ## Changelog |
| 74 | |
| 75 | ### 3.3.1 |
| 76 | * Add disable option for date / author and post type archive. |
| 77 | * Bug fix for `parse_request`. |
| 78 | |
| 79 | ### 3.2.2 |
| 80 | * Fix readme.txt |
| 81 | |
| 82 | ### 3.2.0 |
| 83 | * Support only public post type. |
| 84 | * Add `CPTP_is_rewrite_supported_by_${post_type}` and `CPTP_is_rewrite_supported` filter. |
| 85 | * Remove post_type query wp_get_archives. |
| 86 | |
| 87 | ### 3.1.4 |
| 88 | * Test for WordPress 4.9. |
| 89 | * PHPCS fix. |
| 90 | |
| 91 | ### 3.1.3 |
| 92 | |
| 93 | * Test for WordPress 4.8. |
| 94 | * Bug fix for attachment link. |
| 95 | |
| 96 | ### 3.1.1 |
| 97 | |
| 98 | * Bug fix in `CPTP_Module_Setting::upgrader_process_complete`. |
| 99 | |
| 100 | ### 3.1.0 |
| 101 | |
| 102 | * Add filter `CPTP_date_front`. |
| 103 | * Fix sort term by `wp_list_sort` . |
| 104 | |
| 105 | ### 3.0.0 |
| 106 | |
| 107 | * Admin notice on update plugin. |
| 108 | * Large bug fix. |
| 109 | * no_taxonomy_structure bug fix. |
| 110 | * Add default value for options. |
| 111 | |
| 112 | ### 2.2.0 |
| 113 | |
| 114 | * add `CPTP_Util::get_no_taxonomy_structure`. |
| 115 | |
| 116 | ### 2.1.3 |
| 117 | |
| 118 | * Set `no_taxonomy_structure` default `true`. |
| 119 | |
| 120 | ### 2.1.2 |
| 121 | |
| 122 | * `rewirte => false` post type support. |
| 123 | |
| 124 | ### 2.1.0 |
| 125 | |
| 126 | * Create rewrite rule on `registered_post_type` and `registered_taxonomy` action. |
| 127 | * Not create taxonomy rewrite rule when `rewrite` is `false`. |
| 128 | |
| 129 | ### 2.0.2 |
| 130 | |
| 131 | * pointer html bug fix. |
| 132 | |
| 133 | ### 2.0.0 |
| 134 | |
| 135 | * `add_rewrite_rules` on `wp_loaded` priority is changed 10 from 100. [](https://github.com/torounit/custom-post-type-permalinks/issues/53fix issue #53](https://github.com/torounit/custom-post-type-permalinks/issues/53](https://github.com/torounit/custom-post-type-permalinks/issues/53) |
| 136 | * Replace `wp_get_post_terms` by `get_the_terms`. [](https://github.com/torounit/custom-post-type-permalinks/issues/55fix issue #55](https://github.com/torounit/custom-post-type-permalinks/issues/55](https://github.com/torounit/custom-post-type-permalinks/issues/55) |
| 137 | * Fix bug `register_uninstall_hook` called twice on each page. [](https://github.com/torounit/custom-post-type-permalinks/issues/56fix issue #56](https://github.com/torounit/custom-post-type-permalinks/issues/56](https://github.com/torounit/custom-post-type-permalinks/issues/56) |
| 138 | ### 1.5.4 |
| 139 | |
| 140 | * Fixed removed parent post problem. |
| 141 | |
| 142 | |
| 143 | ### 1.5.3 |
| 144 | |
| 145 | * readme fix. |
| 146 | |
| 147 | ### 1.5.0 |
| 148 | |
| 149 | * Tested for 4.5. |
| 150 | * Add filter `CPTP_set_{$module_name}_module`. |
| 151 | |
| 152 | |
| 153 | ### 1.4.0 |
| 154 | |
| 155 | * Fix Translation Problem. |
| 156 | |
| 157 | |
| 158 | ### 1.3.1 |
| 159 | |
| 160 | * bugfix `wp_get_archives`. |
| 161 | |
| 162 | ### 1.3.0 |
| 163 | |
| 164 | * bugfix for polylang. |
| 165 | |
| 166 | ### 1.2.0 |
| 167 | |
| 168 | * Add filter `cptp_post_type_link_priority`, `cptp_term_link_priority`, `cptp_attachment_link_priority`. |
| 169 | * Add action `CPTP_registered_modules`. |
| 170 | |
| 171 | ### 1.1.0 |
| 172 | |
| 173 | * WPML Test. thanks [](https://profiles.wordpress.org/keita_kobayashikeita_kobayashi](https://profiles.wordpress.org/keita_kobayashi](https://profiles.wordpress.org/keita_kobayashi) ! |
| 174 | |
| 175 | ### 1.0.5 |
| 176 | |
| 177 | * admin bug fix. thanks [](https://profiles.wordpress.org/ixkaitoixkaito](https://profiles.wordpress.org/ixkaito](https://profiles.wordpress.org/ixkaito) ! |
| 178 | * Translation Update Thanks [](https://profiles.wordpress.org/natali_zNatali_Z](https://profiles.wordpress.org/natali_z](https://profiles.wordpress.org/natali_z) ! |
| 179 | |
| 180 | ### 1.0.4 |
| 181 | |
| 182 | * option bug fix. |
| 183 | |
| 184 | ### 1.0.3 |
| 185 | |
| 186 | * add category rule, if only attached category to post type. |
| 187 | |
| 188 | ### 1.0.2 |
| 189 | |
| 190 | * category slug bug fix. |
| 191 | |
| 192 | ### 1.0.0 |
| 193 | |
| 194 | * Set Permalink enable `register_post_type`. |
| 195 | * Enable add post type query to taxonomy archives. |
| 196 | * Use Class Autoloader. |
| 197 | * Create Rewrite Rule on `wp_loaded` action. |
| 198 | * WordPress Code Format Fix. |
| 199 | * `CPTP_Module_Permalink` Bug Fix. |
| 200 | * Bug Fix. |
| 201 | * Use Semantic Versioning. |
| 202 | * Date Structure Fix. |
| 203 | * Use Category Base. |
| 204 | |
| 205 | ### 0.9.7 |
| 206 | |
| 207 | * Adding date slug only conflicting `%post_id%`. |
| 208 | * Change taxonomy link rewrite rule. Use `post_type`. |
| 209 | * Can change template include custom taxonomy. |
| 210 | ### 0.9.6 |
| 211 | |
| 212 | * Category and author. |
| 213 | * French Transration. Thanks Geoffrey! |
| 214 | * Hierarchial Term Fix. |
| 215 | |
| 216 | ### 0.9.5.6 |
| 217 | |
| 218 | * Strict Standard Error Fix. |
| 219 | |
| 220 | ### 0.9.5.4 |
| 221 | |
| 222 | * archive link bug fix. |
| 223 | * Tested Up 3.9 |
| 224 | |
| 225 | ### 0.9.5.3 |
| 226 | |
| 227 | * “/”bug fix. |
| 228 | * taxonomy tmplate bug fix. |
| 229 | |
| 230 | ### 0.9.5.2 |
| 231 | |
| 232 | * Archives Rewrite Fix. |
| 233 | |
| 234 | ### 0.9.5.1 |
| 235 | |
| 236 | * Admin Bug Fix. |
| 237 | |
| 238 | ### 0.9.5 |
| 239 | |
| 240 | * Big change plugin architecture. |
| 241 | * Show `has_archive`, `with_front`. |
| 242 | |
| 243 | ### 0.9.4 |
| 244 | |
| 245 | * Internal release. |
| 246 | |
| 247 | ### 0.9.3.3 |
| 248 | |
| 249 | * `has_archive` Bug Fix. |
| 250 | * Fixed a bug in the link, including the extension. |
| 251 | |
| 252 | ### 0.9.3.2 |
| 253 | |
| 254 | * `wp_get_archives` Bug Fix. |
| 255 | |
| 256 | ### 0.9.3.1 |
| 257 | |
| 258 | * Tested 3.6 |
| 259 | * Bug Fix. |
| 260 | |
| 261 | |
| 262 | ### 0.9.3 |
| 263 | |
| 264 | * Admin page fix. |
| 265 | * slngle pageing link fix. |
| 266 | * Add Russian translation. |
| 267 | |
| 268 | |
| 269 | ### 0.9 |
| 270 | |
| 271 | |
| 272 | * Add custom post type archive only `has_archive` is `true`. |
| 273 | * Change method name. |
| 274 | * Change hook custom post link. |
| 275 | * Use Slug in `wp_get_archive()`. |
| 276 | * Fix attachment link. |
| 277 | |
| 278 | |
| 279 | ### 0.8.7 |
| 280 | |
| 281 | * Translate Bug Fix. |
| 282 | |
| 283 | ### 0.8.6 |
| 284 | |
| 285 | * Paging Bug Fix. |
| 286 | * Commnent Paging. |
| 287 | * Show pointer. |
| 288 | * |
| 289 | |
| 290 | ### 0.8.1 |
| 291 | |
| 292 | * Bug Fix. |
| 293 | |
| 294 | ### 0.7.9.1 |
| 295 | |
| 296 | * Support Comment permalink. |
| 297 | * Small change in setting page. |
| 298 | * Change default value. |
| 299 | * Bug Fix. |
| 300 | |
| 301 | ### 0.7.8 |
| 302 | |
| 303 | * Bug fix. |
| 304 | |
| 305 | |
| 306 | ### 0.7.7 |
| 307 | |
| 308 | * Bug fix. |
| 309 | |
| 310 | ### 0.7.6 |
| 311 | |
| 312 | * Add parent's slug to hierarchical post type. |
| 313 | |
| 314 | |
| 315 | ### 0.7.5 |
| 316 | |
| 317 | * Add ability to disable to change custom taxonomy archive's permalink. |
| 318 | |
| 319 | |
| 320 | ### 0.7.4 |
| 321 | |
| 322 | * Bug fix taxonomy rewrite. |
| 323 | |
| 324 | |
| 325 | ### 0.7.3 |
| 326 | |
| 327 | * Changed part for saving the data. |
| 328 | |
| 329 | ### 0.7.2 |
| 330 | |
| 331 | * Reweite bug fix. |
| 332 | * Prewview bug fix. |
| 333 | |
| 334 | ### 0.7.1 |
| 335 | |
| 336 | * Bug fix. |
| 337 | |
| 338 | ### 0.7 |
| 339 | |
| 340 | * Add `%{taxonomy}%` tag. |
| 341 | * A large number of Bug Fix. |
| 342 | * Change Setting Page. Use Setting API. |
| 343 | |
| 344 | |
| 345 | ### 0.6.2 |
| 346 | |
| 347 | * Fix `%author%` tag. |
| 348 | |
| 349 | ### 0.6 |
| 350 | |
| 351 | * First release on wordpress.org |
| 352 |