Note: This is part of the developer docs and is considered custom code.
Unfortunately, we cannot provide support for custom code at this time as we do not have the additional resources that would be necessary to provide support for custom code.
If you need assistance with this, please reach out to our list of consultants for further assistance:
rcp_is_restricted_content( $post_id )
This function will check whether the given post has some kind of restrictions applied to it, whether it's subscription level, access level, role, etc. This also checks if a post is restricted via term and will return true if so.
- $post_id - ID of the post you'd like to check.
trueif the post has any kind of restrictions assigned to it, or is assigned to a term that is restricted.
falseif the post does not have any restrictions.