Tell us what you are trying to do?
I made a post type called Wiadomosci
and added group of fields (odbiorca, email, etc.)
I have created form with this fields
Now i want to:
- display view depanding on this scheme:
user ID or username must be equal to odbiorca (odbiorca isn't a post author but he must see posts that he is set as odbiorca)
What is the link to your site?
Nigel
Supporter
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/London (GMT+00:00)
Hi there
I think you need to choose between user ID or username.
You can add a Query Filter to your View that specifies that the field for the user ID or username is set by a shortcode attribute.
Then when you insert the View on a page set the corresponding shortcode attribute using the wpv-user shortcode (specifying whether you want to output the ID or the username): https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-user
You can read about passing values to Views with shortcode attributes here: https://toolset.com/documentation/user-guides/passing-arguments-to-views/
If you have problems let me know and I'll help, but please specify whether your custom field stores the user ID or username.