Home › Forums › General Issues › Creating a \"Private\" area › Reply To: Creating a \"Private\" area
Looks secure enough to me.
Is the entire page supposed to be secure or just a portion of the content. At any rate, if you’re not outputting the content then there isn’t any way for the person to see it. If the person is not supposed to access the page at all I would probably redirect them to a different page. Also, you can probably just use get_current_user_id()
https://developer.wordpress.org/reference/functions/get_current_user_id/ would save you a line of code.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.