I am trying to list all transactions between two users.
There is a custom post type called transactions that has an author id that is the one who started the transaction and the payee-id that is receiving the transaction. I can show the transactions with the author_id, but i cannot with the wpcf-payee-id of the current user. How can i do that?
Hi,
Thank you for contacting us and I'd be happy to assist.
In the query filter for the custom field, you'll specify the name of the shortcode attribute, for example, 'payee', and not the value (i.e. [wpv-current-user info='id'] ).
( screenshot: hidden link )
The value will be passed in the shortcode that loads the view, like this:
( ref: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-view )
[wpv-view name="Name of the view" payee="[wpv-current-user info='id']"]
Note: You'll replace the 'Name of the view' with the actual name of your target view.
regards,
Waqar
Great, Waqar!
Now I have another thing to do. This list must show lines if the current user is the author or if it is the payee.
I have attached the prints of the view configuration, the page and the result.
Theoratically I need to use the filters post_author OR payeeid, but I think it is still tryng an AND.
Thanks for writing back and glad I could help.
I've created a separate ticket for your new question and will follow up on that shortly.
( ref: https://toolset.com/forums/topic/split-show-content-if-the-current-user-is-the-author-or-the-payee/ )
You're welcome to mark this ticket as resolved and start a new one, for each new question or concern.