Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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