Protect Custom Post Types

You can use Custom Post Types with MemberMouse under most conditions. When creating a custom post type for WordPress, the developer will assign a capability type, telling WordPress how to view these custom posts. There are two main capability types, ‘post' (default), and ‘page'. There may be others used, but these are the two that will be relevant to MemberMouse. If you are unsure of the type of custom post you are using, you can reach out to the developer, or use the following information to see what protection methods are available to you in MemberMouse when using them.

You can protect custom posts with the page and post capabilities  one at a time, or use the drip content schedule.  Custom post types with the post capability can also be protected by category. There are some Learning Management Systems where custom post types may not appear in the drip content schedule, and will need to be protected using the Grant Access button inside the page/post editor, or by category if supported by your post type settings.

If you're using custom post types and you want to be able to make those pages into MemberMouse core pages, you'll need to ensure that your custom post type has page capabilities. If you're unsure if this is the case you'll want to reach out to your developer to ask them about this.

This is the check that MemberMouse does in order to determine if the custom post type is something we can work with:

$postTypeObj = get_post_type_object($post->page_type);

if($postTypeObj->capability_type == "page")

    // allow to be core page

Was this article helpful?

Related Articles

Can’t find the answer you’re looking for?

Reach out to our Customer Success Team
Contact us!