• Resolved kptgreg

    (@kptgreg)


    I activated the Add-on “Members – ACF Integration” in Members>Add-Ons and on the page I put checks next to Admins – Subscribers etc.to only have CONTENT PERMISSIONS (Limit access to the content to users of the selected roles.) But when I go to the page it says “Sorry, but you do not have permission to view this content.” but still shows ALL the ACF content. What else do I need to do? Do I need to add something in the PHP in the template code? Or?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Omar ElHawary

    (@omarelhawary)

    Hi @kptgreg,

    Thanks for reaching out Members Support Team!

    You can protect pages/posts with Members as this screenshot. You can select a Role(s) that can see it. So, you can use some PHP in your templates to also check for the same role(s):

    if(current_user_can('subscriber')) {
    
     // ACF output goes in here 
    
    }

    If you want to check for multiple roles

    if(current_user_can('subscriber') || current_user_can('contributor') {
     // ACF output goes in here 
    }

    You can read more in this thread.

    Regards,

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.