Tell us what you are trying to do?
i have two post types
1. voters
2. poll-address
i want to show the poll address by voter. i'm using the custom field "pole-number" in both post types.
in voter there is the poll number
in poll-address there is the poll number and all the other fields like address, poll name and on.
i want to search voter by "voter-id" and show fields from "voters" (first name, last name...) and from the post type "poll-address" (poll-address, poll name,...)
Is there any documentation that you are following?
Is there a similar example that we can see?
What is the link to your site? hidden link
(please don't show the link in public i be happy if the all ticket will be privet)
However, if you want to manually manage post connections as you are doing with a poll-number then it is possible when displaying one post (e.g. a voter) to display fields from the other post (i.e. the poll address).
Say you are displaying a voter (either an individual voter, or a list of voters from a search View).
Where you want to display fields from the linked poll-address you need to insert another View, this time which displays the poll-address post and which includes a Query Filter for the poll-number field where the value comes from a Views shortcode argument.
Then when you insert the wpv-view shortcode you manually add the argument, using a types shortcode for the poll-number field to provide its value.
- your Voter post has a poll-number field (which you can insert with a shortcode generated by the Fields and Views button)
- you are going to pass this poll-number (as a shortcode argument) to a View that displays poll-address posts
- that View will use a Query Filter for the poll-number to only show the poll-address with a poll-number that matches that passed by the shortcode argument
- the output of that View will contain whatever fields from the poll-address post you want to appear in this context