Skip to content

Instantly share code, notes, and snippets.

@shawnkfinn
Last active August 29, 2015 14:26
Show Gist options
  • Save shawnkfinn/253dede61fef2e14bee5 to your computer and use it in GitHub Desktop.
Save shawnkfinn/253dede61fef2e14bee5 to your computer and use it in GitHub Desktop.
Register custom post types with wppb.io
/**
* 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