Home › Forums › ACF PRO › Query CPT by User field custom field › Reply To: Query CPT by User field custom field
What you need to do is put some PHP at the top of the template file, before get_header(); that gets the current user_id, compares it to the user_id for the profile page and if they do not match then redirect them to there own user profile page. At least that’s probably what I’d do. Anyone that was not logged in and did not have a user profile page I’d probably redirect somewhere else.
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.