Problem:
I created a post type called "Stores" that displays store info and a Google map for each store. I created a second post type called "Upcoming Events" that shows event information and date of each event. I would like to display Upcoming Events for each store based on the value of a field (Store Number) from the Store post type. The store number is part of the information entered for each store, it is not the post ID. I would like to be able to create an Upcoming Event and enter a comma separated list of Store Numbers in order to display the event on one or more store pages.
Solution:
In your case, one "Upcoming Event" post can connect to multiple "Stores" posts, and one "Stores" post can connect to multiple "Upcoming Event" posts, that is many-to-many relationship,
I suggest you follow our document to setup many-to-many relationship between post type "Upcoming Event" and "Stores", within many-to-many relationship, it is not required to re-entering the same Upcoming Event info for each store location.
Relevant Documentation:
Creating and Displaying Many-to-Many Post Relationships
https://toolset.com/documentation/user-guides/many-to-many-post-relationship/
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 |
---|---|---|---|---|---|---|
- | 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)