Last active
August 29, 2015 14:26
-
-
Save shawnkfinn/253dede61fef2e14bee5 to your computer and use it in GitHub Desktop.
Register custom post types with wppb.io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Register Custom Post Types | |
* | |
* How this works: Paste the line below in your plugin's main cpts.php file | |
* | |
* Your_Plugin_CPTS()->register_post_type( 'SAMPLE_POST_TYPE', __( 'SAMPLE_PLURAL_NAME', 'your-plugin-name-cpts' ), __( 'SAMPLE_DESCRIPTION Page', 'your-plugin-name-cpts' ), __( 'SAMPLE_MENU_POSITION', 'your-plugin-name-cpts' ), __( 'SAMPLE_DASHICON', 'your-plugin-name-cpts' ), __( 'SAMPLE_SLUG', 'your-plugin-name-cpts' ) );Your_Plugin_CPTS()->register_post_type('SAMPLEPOSTTYPE', __) | |
* | |
* Replace all "SAMPLE_BLAH_BLAH" with desired options. | |
*/ | |
Your_Plugin_CPTS()->register_post_type( 'SAMPLE_POST_TYPE', __( 'SAMPLE_PLURAL_NAME', 'your-plugin-name-cpts' ), __( 'SAMPLE_DESCRIPTION Page', 'your-plugin-name-cpts' ), __( 'SAMPLE_MENU_POSITION', 'your-plugin-name-cpts' ), __( 'SAMPLE_DASHICON', 'your-plugin-name-cpts' ), __( 'SAMPLE_SLUG', 'your-plugin-name-cpts' ) );Your_Plugin_CPTS()->register_post_type('SAMPLEPOSTTYPE', __) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment