Customized WHERE to select only own posts
-
HI,
Thanks for a great tool which I have been using in many of my sites.
In a recent site, I created 2 custom post types: “Content” and “Publisher”. There is a field in Content called “publisher” which is a bidirectional related field to “Publisher” type.
In the Advanced Field Options, I want to “Customized WHERE” to allow selection from only the publishers that this author has created (but not other publishers created by other authors). I can figure out how to put in a specific author’s ID, for example, “post_author = 6”, and this works.
However, how do I generalise this to a variable, “post_author = ???”, so that this logged in user (an author), only see the items that he/she has created?
Thanks a lot
The page I need help with: [log in to see the link]
- The topic ‘Customized WHERE to select only own posts’ is closed to new replies.