Restrict Content Pro

rcp_get_post_ids_assigned_to_restricted_terms()

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 post IDs assigned to taxonomy terms that have real restriction settings in rcp_restricted_meta. Terms with empty meta or only a legacy access level of None are skipped (and empty legacy meta may be removed).

Covers all public taxonomies. Cached in rcp_post_ids_assigned_to_restricted_terms for one day; cleared when posts or term restrictions change (same hooks as rcp_get_restricted_post_ids()).

Parameters

None.

Return values

(array) – Post IDs linked to at least one restricted term.

Examples

$term_restricted = rcp_get_post_ids_assigned_to_restricted_terms();

foreach ( $term_restricted as $post_id ) {
	$restrictions = rcp_get_term_restrictions( /* term ID */ );
}

Use rcp_get_term_restrictions() for settings on a specific term and rcp_user_can_access_term() for user access.

Last updated: October 15, 2026
Was this page helpful?
Thanks for the feedback!