Skip Navigation

[Resolved] how to set relationship on custom field?

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by Minesh 1 year, 11 months ago.

Assisted by: Minesh.

Author
Posts
#2535661
2.png
1.jpg

Hello,
I have to create new ones within my site (follow the screens named in numerical order), now from the "post type" I will create the fields that will make up my template, so far so good.

I need to create relationships between the posts, for example Europe ---> Italy ---> Rome, then make everything about Italy appear on the Italy pages and then everything about Europe (establishing a my priority).

Another example in the pages with Amerca template ---> USA, I will have to see for example the USA templates followed by Canada and then Europe with England, Spain, etc...

How should I set these things up? through Taxonomies?

#2536089

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I need to create relationships between the posts, for example Europe ---> Italy ---> Rome, then make everything about Italy appear on the Italy pages and then everything about Europe (establishing a my priority).
==>
I would like to know, have you created the post types to store such structured data with which you can establish post-relationship.

For example:
- Europe (it will be a Region post type where you can add a post with title Europe and many other regions)
- Italy (it will be another post type "Country" where you can add a post with title Italy and many other countries)
- Rome (It will be another post type "City" where you can add a post with title Rome and many other cities)

Now, regarding post relationship between all those post types:
- Regions post type
- Countries post type (you should create one to many post relationship between Region (one) and Countries (many) )
- Cities post type (you should create one to many post relationship between Countries (one) and Cities (many) )

Does the above information fits into your needs or structure?

You can check how "states" and "cities" post type are setup with our free test platform http://www.discover-wp.com with the real estate reference site:
=> https://discover-wp.com/site-types/cb-properties-real-estate-site/

You may try to setup the structure by creating the test site with http://www.discover-wp.com and see if that fits into your requirements.

More info:
=> https://toolset.com/course-lesson/how-to-set-up-post-relationships-in-wordpress/#one-to-many-relationships

#2536287

those examples are close to my goal, so to do this i have to create the shortcodes i have to put them inside an "article"?

I thought of developing everything using the Template function of toolset

#2536295

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I suggest you should go step by step. Please create required post types, custom fields, post-relationships and add some content.

Here is the doc that shows how you can display the related posts:
- https://toolset.com/course-lesson/displaying-related-posts/

#2536413

can I start creating my posts and then try to create correlations? or is it better to do it from the beginning?

#2536809

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

You should first create the data structure:
- post types, custom fields and taxonomies

then you should create post relationship between your post types and then you should try to add few content (posts) to your posts types and then you test if its working as expected as per your requirement.