[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.
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.
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
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.
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.
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
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
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.