Problem:
I'm just getting started, nothing to show. Trying to lay out my data structure and determine best ways to implement, and I have a challenge to solve.
At the heart of my structure are custom post types called States. What I am struggling with is how to show simple from/to relationships between States, so that on a State post, I can easily display related states, designating some as "from" and others as "to." I've attached an rough image showing what I mean.
One possible challenge to this is that I expect to post dozens if not hundreds of States, and some will have the same name. I need to be able to easily link from one State to the correct from/to State when entering the data.
Is this possible in Toolset?
Solution:
I don't think it is possible within only one post type, within only one post type, there is only a "hierarchical" option
https://codex.wordpress.org/Function_Reference/register_post_type#hierarchical
And Toolset post type relationships are based on different post types:
https://toolset.com/documentation/post-relationships/
In my opinion, you can try these:
1) Create two post types:
- States
- Transforms
2) Create two one-to-one relationships between "States" and "Transforms"
- States transforms from
- States transforms to
https://toolset.com/documentation/post-relationships/
Then you will be able to connect "States" posts with each other
In a single "State" post, you can get the related "Transform" post on different relationships, and display the related "State" post
Relevant Documentation:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
This topic contains 7 replies, has 2 voices.
Last updated by 6 years, 3 months ago.
Assisted by: Luo Yang.