Hi there,
I need some advise.
For our website we want a possibility to make contact details for sales persons.
These sales persons work on different projects in different countries (see the image - the red box).
We have our projects as custom post types (content templates - views) and would like the possibility to select the right sales person by a selection option (checkboxes or select).
The choice should feed the data for this sales person (image, contactdetails etc) and insert it to the project (content templates - view)
To clear it a bit More - The sales man should be attached to a project:
Project A - Sales person 1
Project B - Sales person 1
Project C - Sales person 2
Project D - Sales person 3
Project E - Sales person 3
Project F - Sales person 3
How can I make this work and what's the best approach?
Hope you can point me in the right direction...
Thanks,
Paul
Hi there,
Here's a update for the above question.
- We tried to make it work like this:
- We made a many-to-many relationship (Sales person <=> Project).
- We made a custom fields - Post fields group with the fields Team-member-group (tel / email / image).
- After that we made a view (team-member-content) with these fields
- We inserted the view in our Content template Project
- Now we have a result inside the Projects page which says: No items found
Maybe we can pick this up from here, we watched the videos an read the guide about relationships but cannot see what we do wrong...
Thanks,
Paul
Hi Paul,
Thank you for contacting us and I'll be happy to assist.
Glad that you're making progress in the right direction and it is a good idea to connect "Sales person" & "Project" through a many-to-many post-relationship.
( ref: https://toolset.com/documentation/post-relationships/ )
Once you have custom field data stored with "Sales person" post type, you can show information from only the connected sales persons on an individual project page, using a view, as explained in this guide:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/
In summary, that view will be set to show "Sales person" post type, but through query filter, you'll set it to show only those which are in a relationship with the current post.
I hope this helps and please let me know if you need any further assistance around this.
Note: in case the issue still persists, you're welcome to share temporary admin area access in reply to this message.
I've set your next reply as private and please make a complete backup copy of the website, before sharing the access details.
regards,
Waqar
Hi Paul,
Thank you for sharing the access details.
I noticed that view's settings, needed two adjustments:
1. The view was set to show "Projects" posts and not the "Team" posts.
( screenshot: hidden link )
Since this view needs to show connected team member's info (and not the project's info), it should be set to show "Team" posts.
2. As this view is placed inside the content template for the projects, the correct option for the query filter settings would be "The current post in the loop".
( screenshot: hidden link )
After these two changes, the view is showing the related/connected team members on the project pages.
( screenshot: hidden link )
As for your other question, yes it is possible to attach one post type to more than one post types. Each connection will require its own relationship, just like you added "Projects Team" and to show information from related/connected posts, you'll need a different view for each relationship, similar to how you added the view "Team - Projects / Resales"
regards,
Waqar
Hi Waqar,
Sorry for my late response. it was quite busy...
Thanks for your support, really appreciated.
We have it working but notice one problem.
We can connect our 'team members' to our 'projects'.
Because we have a multi language website we want to connect 'team members' per language.
Now the 'team members' are inserted in all language versions of our 'projects'
Do you know how we can decide per language which 'team member' is attached?
Kind regards,
Paul
Hi Paul,
Thanks for the update and glad it is working.
The translated posts in WPML are virtual copies of the original posts. The current active language determines, which of those copies will be shown to the visitor.
For this reason, when a connection will be created between two posts ( for example a "team member" and a "project" ), this relationship will hold/exist, across all languages.
This point is explained in more detail at:
https://toolset.com/documentation/translating-sites-built-with-toolset/translating-related-content/
If your project requires that the relationships are formed in language dependent way, then you'll need to add each of your team members, as a separate post for each language.
For example, if you have a team member named "John Doe" and the website has 3 languages, "EN", "NL" and "DE", then you'll add the total of 3 independent (and not just translated) posts for him in "team member" post type:
- John Doe
- John Doe - NL
- John Doe - DE
I hope this helps and for a new question/concern, please open a new ticket.
regards,
Waqar
Hi Waqar,
I cannot resolve the member per language issue.
You advise:
For example, if you have a team member named "John Doe" and the website has 3 languages, "EN", "NL" and "DE", then you'll add the total of 3 independent (and not just translated) posts for him in "team member" post type
When I create a member in DE it always needs a translation in the native language.
Can you please help us out on this?
maybe you can create:
- one person (1) which is only available in DE
- another person which is available in the other languages NL and EN
On that way we can see how things are set-up.
You still have access to the backend...
Kind regards,
Paul
My issue is resolved now. Thank you!