Hello, i’ve create two custom post type and i’ve assign every post foer every each user in my website using the acf field relationship “user”.
I’ve also create a script to make an automatic redirect. If the logged post have a post assigned (with user acf field), the script redirect the visitor to their post, if there aren’t any post redirect to a specific page.
So this scirpt function but i have a problem. Every visitor can see on front end the post on cpt. How can i do to restrict the access to only user slect on user field acf?