Skip to content

Instantly share code, notes, and snippets.

@curtismchale
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save curtismchale/cb035d42c42eb19af3f7 to your computer and use it in GitHub Desktop.
Save curtismchale/cb035d42c42eb19af3f7 to your computer and use it in GitHub Desktop.
Adds a Custom Post Type called 'members_cpt' to the list of allowed post types.
<?php
/**
* Adds the custom post type 'members_cpt' to the list of post types allowed
*
* @param array $allowed Existing array of allowed CPT's
* @return array $allowed Modified array of allowed CPT's
*/
function add_members_cpt( $allowed ){
$allowed[] = 'members_cpt';
return $allowed;
}
add_filter( 'wecr_allowed_post_types', 'add_members_cpt' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment