This topic contains 1 reply, has 2 voices. Last updated by Cristián Lávaque 4 years ago.
Topic Author | Topic |
---|---|
Posted: Thursday Dec 20th, 2012 at 6:50 pm #35194 | |
Hi all, I’m working on a site for which I’ve given users with a particular level of access the ability to edit a post (a publicly available profile to view). I have a form built to allow users to edit the post, and I was wondering if it was possible to restrict access to that form so the link is only visible to the user if that user is the post’s author. Something like this:
Is that possible? I’d really appreciate the help. Thanks! EDIT: I’ve resolved the problem. If anyone else is looking for a solution to an issue like this. Here’s what I ended up doing: I created a shortcode to test the current page user. I use that code between s2If blocks that test for the appropriate user level. The code I used in functions.php looks like this:
The code I use in the edit window:
That seems to do the trick.
|