Restrict Content Pro

rcp_has_post_restrictions

Coming soon: Restrict Content Pro is becoming Kadence Memberships. You may see both names used while we update the product, documentation, and customer experience.

Note: This content is provided as a resource within our developer documentation. Because custom code requires highly specific implementation, we encourage you to work with a qualified developer if you need guidance. You can find our recommended consultants here: https://codeable.io/developers/restrict-content-pro

Returns whether a post has restriction settings saved on the Restrict this content metabox (post meta only). It does not include post-type-wide rules or taxonomy restrictions. For any restriction on a post, use rcp_is_restricted_content(). For the raw requirement array, use rcp_get_post_restrictions().

Checks include: paid-only (_is_paid), membership levels (rcp_get_content_subscription_levels()), WordPress roles (rcp_user_level), and access level (rcp_access_level), when those values are set and not treated as “none.”

Parameters

$post_id (int) – Post ID. Empty or non-numeric IDs return false.

Return values

(bool) – true if the post has metabox-level restrictions; otherwise false.

Examples

if ( rcp_has_post_restrictions( get_the_ID() ) ) {
	// This post has per-post restriction settings.
}
if ( rcp_is_restricted_content( $post_id ) && ! rcp_has_post_restrictions( $post_id ) ) {
	// Restricted via post type and/or term rules, not the post metabox.
}
Last updated: October 14, 2026
Was this page helpful?
Thanks for the feedback!