Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MWDelaney/roots-example-cpt
An example of a WordPress Custom Post Type designed for easy inclusion in a Roots/Bedrock project.
https://github.com/MWDelaney/roots-example-cpt
Last synced: 3 months ago
JSON representation
An example of a WordPress Custom Post Type designed for easy inclusion in a Roots/Bedrock project.
- Host: GitHub
- URL: https://github.com/MWDelaney/roots-example-cpt
- Owner: MWDelaney
- Created: 2017-07-07T23:35:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-21T14:24:42.000Z (almost 5 years ago)
- Last Synced: 2024-05-02T04:16:43.653Z (7 months ago)
- Language: PHP
- Homepage:
- Size: 39.1 KB
- Stars: 25
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Roots and Sage Friendly Example Custom Post Type Plugin using PostTypes
An example WordPress custom post type as a plugin using the fantastic [PostTypes](https://github.com/jjgrainger/PostTypes).Designed for easy-inclusion with [Roots](https://roots.io) [Bedrock](https://roots.io/bedrock/), but easily used in any WordPress project.
## If you want to adapt this for your own work
* Update `composer.json` to change the name of the plugin and the PSR-4 autoload namespace
* Update the plugin block and namespace in `plugin.php`, and the namespace in `app/init.php`
* Update all instances of `EXAMPLECPT_PLUGIN_DIR` and `EXAMPLECPT_PLUGIN_URL`
* Run `composer update` to regenerate the autoload files
* Rename and update `app/types/example.php` to fit your needsAdd the plugin to your WordPress `plugins` or `mu-plugins` directory, or include it as a Composer dependency in your Bedrock project.