By default, there are no some permalinks of custom post type. The Custom Post Type Rewrite plugin adds permalink structure of custom post type. Following:
Note: Regarding has_archive and rewrite in $args of Parameters, the priority of the rewrite rule conforms to register_post_type().
- Download and unzip files. Or install Custom Post Type Rewrite plugin using the WordPress plugin installer. In that case, skip 2.
- Upload “custom-post-type-rewrite” to the “/wp-content/plugins/” directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
- Save permalink structure and refresh permalinks through the ‘Settings > Permalinks’ menu in WordPress.
- Have fun!
IMPORTANT: By default, WordPress will not work the Custom Post Type Rewrite. You need to refresh permalinks.
For operation compatibility between PHP version and WordPress version, see below Github Actions.
Small patches and bug reports can be submitted a issue tracker in Github. Forking on Github is another good way. You can send a pull request.
If you would like to contribute, here are some notes and guidlines.
Contributors & Developers
“Custom Post Type Rewrite” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- edit README
- add test case
- fix the priority of the rewrite rule of register_post_type()
- change mysql from version 8.0 to version 5.7 using docker image
- fix indent style
- change plugin initialization to wp_loaded hook
- fix ‘Trying to get property ‘permalink_structure’ of non-object’ warning
- change plugin initialization to plugins_loaded hook
- replace assert from assertEquals to assertSame
- update wp-plugin-unit-test.yml
- bump up yoast/phpunit-polyfills version
- change os to ubuntu-20.04 for ci
- add Upgrade Notice
- change requires at least to wordpress 4.9
- change requires to PHP 5.6
- add timeout-minutes to workflows
- add phpunit-polyfills
- tested up to 5.8.0
- add .editorconfig
- tested up to 5.7.0
- separate a class into a class file
- add test case
- add sponsor link
- add FUNDING.yml
- add donate link
- update wordpress-test-matrix
- add GitHub actions for CI/CD, remove .travis.yml
- fix rewrite_rule
- fix indent and reformat with phpcs and phpcbf
- add composer.json for test
- add static code analysis config
- change Requires at least from 3.4.1 to 3.8
- fix add_rewrite_rule
- fix date-based permalink structure
- fix phpunit tests
- add phpunit and tests
- Initial release