In this lesson, we will create a link between the course and event post types. We will associate every event with one or more courses.

Creating a custom field to link event and course

We will create a custom field to store the relationship between the event and course post types.

Click the "ACF" option from the admin dashboard sidebar and choose "Field Groups." Provide Related Course as the name of the field group.

Set field type to Relationship

The Related Course field group will have only one field to link the course and events post types. The "Field Type" is "Relationship" found under the section labeled "Relational."

Get hands-on with 1200+ tech skills courses.