Is there a way to restrict access to a edit post link (created using layouts) ?
I know how to restrict the access to the edit button on the post. As well as the content and form on the new URL.
But how do you restrict access to the actual URL ?
I use access to set restrictions to the post type. But I want the "edit post link" to have different restrictions for different roles, so I don't want it visible at all to other users.
Is there a way to accomplish this ? There are no settings in Access for unassigned layouts.
YES I'm using your Access plugin ....... The issue is the URL is visible to anyone who knows the URL, even if the form is only visible to the author. I want the URL only visible to the author not everyone.
example A hidden link
everyone has access to this
example B hidden link
only author has access to this
Thank you for the clarity. I was under the impression that you were using conditional tags to hide the button to access the form.
In this case no there isn't a way to hide the URL.
Given that the page itself is dynamically generated we won't be able to redirect users to another page if they try to access it without having the correct permissions.
However your JS redirect is actually quite a smart solution that I didnt think of. Essentially you're going to check if a particular content displays and if it does then you redirect the user using Javascript correct?
This should serve as a suitable solution given that we don't have any inhouse.