Skip Navigation

[Resolved] How to set this up?

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 1 voice.

Last updated by Minesh 3 months ago.

Assisted by: Minesh.

Author
Posts
#2805441
rhythm.png

I want to create a custom post type for "Songs", which will contain custom fields for the song name and the artist, and then some info regarding the type of rhythm.

The rhythm info needs to be structured according to the image I've uploaded, there are Genres, Patterns and Beats associated with each.

I'm unsure of the most appropriate way to create this Rhythm data in Toolset, in a way that I can use within my "Songs" cpt.

Grateful if you can outline where I should start, to save me wasting time setting off on the wrong foot.

Thank you.

#2805534

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I suggest you should create another post type Rhythms and add a taxonomy for Genre and custom field that holds the Beat and pattern.

Then you can create post relationship between post types Songs and Rhythms to connect Song post with many Rhythms.

More info:
- https://toolset.com/course-lesson/what-are-post-relationships-and-how-they-work/
- https://toolset.com/course-lesson/how-to-set-up-post-relationships-in-wordpress/

#2805735

Thank you Minesh,

Just to clarify, what I'm aiming for here is to have a resource for a community of musicians who use a specific looper device. The rhythm configurations I shared are related to that device.

So what I'm hoping to build is a front end form where people can add songs that they've worked on, and then pick the appropriate genre, pattern, beat from drop down lists that match the rhythm data, as it appears in the screenshot I provided. People should only be able to choose patterns that belong to the genre they've chosen.

The songs posts will then be available via a View, so people can look up specific songs and discover rhythm patterns that are known to fit well.

Will your suggested approach work, or would I need to change anything?

#2805775

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Minesh is not available today, he will be available on Minday.

Based on your requirements that I understand, here's an approach to set up your "Songs" custom post type (CPT) with associated rhythm information using Toolset:

1. Define the Custom Post Types and Taxonomies

- Create Custom Post Types:
- Songs: This CPT will store individual song entries.​
- Rhythms: This CPT will represent rhythm configurations associated with the looper device.
- Create Custom Taxonomies:
- Genre: A hierarchical taxonomy (e.g., Rock, Jazz, Pop) assigned to the Rhythms CPT.​
- Pattern: A hierarchical taxonomy representing specific rhythm patterns, also assigned to the Rhythms CPT.
- Beat: Another hierarchical taxonomy indicating beat types, assigned to the Rhythms CPT.​

2. Establish Relationships Between CPTs

Utilize Toolset's post relationships to connect Songs and Rhythms:​

- Many-to-Many Relationship: A song can have multiple rhythms, and a rhythm can be associated with multiple songs.​

Use the documentation my colleague already shared.

3. Set Up Front-End Forms for Song Submission

To allow users to submit songs and select associated rhythm information:​

Create a Front-End Form:

- Go to Toolset → Forms and create a new post form for the Songs CPT.​
- Include fields for song name and artist.​
- Add a post relationship field to connect the song to existing rhythms.​

Conditional Display of Rhythm Options:

To ensure users can only select patterns and beats relevant to the chosen genre, utilize Toolset's conditional display features:​

Use Conditional Groups in the form to show or hide pattern and beat options based on the selected genre.

For more information:

https://toolset.com/course-lesson/conditional-display-for-form-inputs/

4. Display Songs and Associated Rhythms

Add a page and use the Toolset Views block to add the display option and the filtering. For more information:

https://toolset.com/course-chapter/creating-custom-searches-for-directory-items/

Thanks.

#2805960

Minesh
Supporter

Languages: English (English )

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

Can you please confirm the approach shared by Christopher works for you.

#2805977

Thank you Christopher for your detailed guide, much appreciated.

I've created a new CPT for Songs, which contains some associated custom fields for the artist, and a post-reference field linked to the Rhythms one.
I've also made a new CPT for the Rhythms, with hierarchical custom taxonomies for Genre, Pattern and Beat, as suggested.
I've connected the two via a many-to-many relationship (using all the default options).

I've created a new post form for "Submit a Song", linked to the Songs CPT.

This is where I'm getting a bit confused...

The form I've created doesn't pull through the Genre/Pattern/Beat options.
What it seems to be doing instead is trying to list any "Rhythm" posts that already exist.
Question - Do i need to create all the possible Rhythm combinations myself first?
I was hoping that this form would allow the user to add the song name, artist, and then choose the genre, pattern and beat separately.

Have I missed a step somewhere?

thanks
Alan

#2805979

Minesh
Supporter

Languages: English (English )

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

You should be able to select the the Genre/Pattern/Beat separately when you have created the separate taxonomy for Genre/Pattern/Beat.

If you can share admin access details and where you added your form and once I review that I will be able to guide you in the right direction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2805995

Minesh
Supporter

Languages: English (English )

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

Well - I see the taxonomies you created:
- hidden link

The taxonomies Beats, Patterns and Genres are belongs to post type Rhythms so when you add the song post it will not available to select.

If you create a post form to add/edit Rhythms post then the taxonomies Beats, Patterns and Genres are available to select the option.

#2806000

Ok, I've created a post form for the Rhythms info.
Are you saying I should now be able to see that form, with the Rhythm taxonomies etc, within the "Submit Song" form?
That doesn't seem to be the case.
Sorry!

#2806002

Minesh
Supporter

Languages: English (English )

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

Well - if you create a post form to add/Edit Song post type, it will allow you to play with custom fields, taxonomies that are directly belongs to Song post type.

In the same way - if you have created post form to add/edit Rhythms post type, it will allow you to play with the custom fields, taxonomies that are directly belongs to the Rhythms post type.

Having said that, while add/edit Song post type post using Toolset form, you will not be able to add/edit Rhythms post type info.

You will have to make a flow then, first either add/edit Song post type and once you submit the form it will redirect the user to another form that belongs to Rhythms post type where you can add/edit Rhythms post. You can decide the workflow as per your requirement.

To link the Song post with Rhythms post, as you have many to many post relationship, you will have to use the post-relationship form.
- https://toolset.com/course-lesson/front-end-relationship-forms-for-connecting-posts/