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