Recognize active members in Restrict Content Pro when searching
-
We recently implemented a licensed version of WPFTS, and it's working great.
I did find a code snippet to change the results per page from the default 5, to 10 per page, and that works.
(Using the Code Snippets plugin to add this.)Here's the issue I'm hoping someone can help with. I've searched the forums, and can't find an answer that quite matches.
We use a membership plugin, Restrict Content Pro, to limit certain content to active members.
When I do a search, get excerpts, then click on the link in the excerpt, I get a 'forbidden' error, even if I'm logged in. Even as an admin.
I assume this is because the pdf in question is behind the RCP member firewall.What I'd like to do is get a bit of code I can implement using the Code Snippets plugin that would recognize the logged in active member, and allow clicking on the link in the excerpt to open the pdf in question.
I found some related code, but it is basically designed to block access, and I'm trying to do the opposite.If it helps, I pulled this from RCP developer docs:
rcp_membership_get_status
Parameters:
$status (string) – The member’s current status.
$membership_id (int) – ID of the membership being checked.
$membership (RCP_Membership) – Membership object.
The membership status we want is 'active'.
Thanks for any help you can provide.