Tell us what you are trying to do? I created a Relationship Form. I created a nested view with a user view and a post view that supplies the form with context about which post it should be modifying, that's owned by the user. The page is called "Working Relationship Form". The views are called "authorship form for relationship form filter" and "display properties of current staff member."
I need to fix the filter on the authorship filter so it relates to the current user.
Is there any documentation that you are following?
https://toolset.com/documentation/user-guides/using-a-child-view-in-a-taxonomy-view-layout/
Is there a similar example that we can see?
What is the link to your site?
How do you mean fix?
It is the default setting of that filter, it should just work like this out of the box.
The Filter is added in any Post View where you can add Query Filters, there choose "Post author is the same as the logged in user" and click save.
That's it, it should now show only posts of the current user.
If this does not work, can you let me know the steps you took?
I just tried it before writing the reply and that worked fine, I got only posts (or whatever else you put into the loop), from the current user.
Greetings.
What I am trying to do is to filter a relationship form so it shows relationships of a custom post type owned by the currently logged in user.
I tested using your method and unsurprisingly, it doesn't immediately work. (passing it a specific ID does work as a user view, and then filtering the post view by the parent user view.) But that doesn't give me the current user's ID, only the ID I enter.
--Sam
Dear Sam,
I assume we are talking about the relationship form of the document:
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/
You can setup shortcode [cred-relationship-role] with attribute "author", for example:
[cred-relationship-role role="child" author="$current"]
You can generate this shortcode within UI, using the option "Options only by the current visitor", see screenshot author-filter2
One more question, I would like to automatically select 1 post owned by the author. I presume this calls for views, and I played around a bit, but would like your guidance.
Yes, you can create a post view to get the specific post owned by the author, in the Views loop, display the relationship form by follow our document:
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/creating-new-connections-between-related-posts/