Skip Navigation

[Gelöst] newbie help needed creating types relationship

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created vor 11 Jahre. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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 12 Antworten, has 2 Stimmen.

Last updated by stevej vor 10 Jahre, 11 Monate.

Assisted by: Luo Yang.

Author
Artikel
#75748

Hello, first of great looking plugins, i've just started with Types and looks promising for what i need, I have been following the tutorials on this site which i find very useful, but have found myself a little stuck with the https://toolset.com/documentation/user-guides/many-to-many-post-relationship/ guide.

What i want to do is have a website with, Bands Events Venues

Band page shows - all events they are playing at

Event details page - list Bands Playing

Venues - List all events

In the above link it talks of creating an Intermediary object "Appearances" < am i right in thinking this would be my "Venues" ? or do i still need to create another intermediary object?

Also how would one go about linking them, i mean i have to create a new 'post' under appearances and just link them? .. - I'm planning on using graivity forms for users to submit there band / event / venues from the front end.

If some one could please help with me creating the relationships for my events, venues, bands, i can move onto looking at creating with "Views" at the moment i'm a little lost with it.

Many thanks

Steve

#75821

Hi stevej,

1) You still need to create another intermediary object, for example: my-intermediary
2) I suggest try this, create 4 custom post types, as following: Bands, Events, Venues and my-intermediary
a) set Venues as parent post type of Events,
b) set my-intermediary as child post type of Bands and Events
Then you will get Many-to-Many Relationships between Bands and Events

Since Venues only List all events, you just need set Venues as parent of Events

Regards
Luo

#75827

Ok great thanks for the reply Luoy,

Now i'm just thinking how will the users link thoses up?

When for example, adding a new event post, the user should be able to select the venue, and what bands are playing.?

#76304

You can use Types to link thoses up in WP admin side, or use CRED form for users in front-end.
https://toolset.com/home/cred/

I think there is Many-to-Many Relationships between Bands and Events, this is what bands are playing.

Please let me know if you need more assistance.

#77332

Thanks, I just dont understand, how it will work in the admin when adding a new event post? ... how will user add what 'bands' are playing??

#77348

As you mentioned above, the document "Creating and Displaying Many-to-Many Post Relationships":
https://toolset.com/documentation/user-guides/many-to-many-post-relationship/

you can see the screenshots show when edit a new place post in WP admin side,there is field table section, where you can control how to link other bands post.

I suggest you try create a test site in your server or using our http://discover-wp.com/ system, where we can work together.

How and why to create a test site in Discover-WP
https://toolset.com/faq/how-and-why-to-create-a-test-site-in-discover-wp/

#79456

ok thanks for offering to help me, i have setup the site here hidden link with the custom post types and relationships as you recommended.

but I have tried linking bands to events but with no luck, please could you take a look at let me know how this is done, i really need to work this out so ill be happy to buy the package.

thanks very much

#79476
5.jpg

I have done following modification in your test site:

1) set post type my-intermediary as child post type of Bands and Events
hidden link

2) edit post type Bands, click "(Edit fields)" link after "my-intermediary" in section "Post Relationship" section, choose "events"
when you edit a Bands post, you can choose a events to build the Many-to-Many Relationships
hidden link
see the screenshot in attachment

3) same as step 2, edit post type Events

Please let me know if you need more assistance.

#79539

OK Thank you i start to see how it works now when editing events, i can add bands ok.

but when wanting to add the venue for the event i don't get the drop down like i do when adding the bands, on the edit event post..

was there some thing i should of changed?.. i see i can type the venue name in the Fields Table venue: post title: but doing so just creates a duplicate of a venue thats already there.

My plan is to have each venue page, show what events they have on. as one venue might have many events that month.

thanks very much for your time, i think we are getting there

#79829

Luo Yang
This answer solved user's issue.

As I have mentioned above, you need "set Venues as parent post type of Events,"

hidden link

And when you edit a Venues post, you will be able to add it's child Events post, such as:
hidden link
in the section "Fields table"

Please let me know if you need more assistance, thanks

#85951

thanks for your help

just one question now i have a theme with a custom post type that was setup manually, how can i edit the post relationship ?

"2) edit post type Bands, click "(Edit fields)" link after "my-intermediary" in section "Post Relationship" section, choose "events""

the Bands post type was setup with the theme ... how would code in this or even import so i can control in types?

thanks!

#86123

Converting custom post types and taxonomy
If you’ve already declared custom post types and taxonomy in PHP, you can tell Types to manage them.

The process goes like this:

Remove the PHP that declared these custom types. Normally, you’ll remove them from functions.php in the theme. Once you do this, all your custom data will appear to have vanished. Don’t worry. It just doesn’t show.
Add it using Types. Make sure that you use the exact same slug. The description can be different but the slug is crucial. If it’s different, the old content will not show. Now, everything displays back as it was.

More help: https://toolset.com/faq/how-do-i-convert-existing-custom-types-and-fields-to-types-control/

#95716

thanks i have manged to do this fine,

but on my live site im having problems saving the child relationships, i keep gettin the spinning wheel ( see attached image)

Also I cant see how with CRED i can get userrs to save this information for bands, it only creates option for the venue parent. any ideas?

Das Forum „Types Community Support“ ist für neue Themen und Antworten geschlossen.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.