Skip Navigation

[Resolved] Canteen menu

This support ticket is created 4 years ago. There's a good chance that you are reading advice that it now obsolete.

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)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 4 years ago.

Assisted by: Luo Yang.

Author
Posts
#2272977

Hello,

I would like to create a daily menu system for a school canteen. I thought a plugin existed but unfortunately not. So since I own Toolset I thought it would be possible.

Basically in the backend I would need the possibility to add daily menus for the canteen (starter, main course, dessert) and to display on the home page only the menu of the day. Therefore, a date conditional is needed.

Honestly I don't know where to start

#2273723

Hello,

In my opinion, it is possible with Toolset plugins, for example, you can try these:
1) Setup two custom post types:
- daily-menu
- dish

2) Setup many-to-many relationship between "daily-menu" and "dish"

3) Every day, website admin, create a "daily-menu" post, and relate it with other "dish" posts

4) In the home page, create a nested views:
a) Parent post view:
- Query the "daily-menu" posts
- Order by post date descending
- Limit one post
- In view's loop, display below child post view
b) Child post view
- Query "dish" posts
- Filter by post type relationship between "daily-menu" and "dish"
- In view's loop, display "dish" post information

In your website home page, display above parent post view.

More help:
https://toolset.com/course-lesson/displaying-related-posts/#displaying-many-related-items