i want to have a checkbox that says whether an item is available for order in restaurant. I would like the owner to have easy access to click a checkbox for yes.
the item will be in a query loop, and has been set up as a custom post in a custom post type (Menu).
How would i set the checkbox to say yes, item available, and at the same time, the checkbox also is Yes in the post, so that the query can display that item (query will show items from menu that have available selected?
Pizzeria (settings topmenu) --> Available items (settings submenu) --> Vegan Pizza (Custom Field Checkbox: Y if ticked).
Pizzeria (settings topmenu) --> Pizzas (settings submenu) ---> Vegan Pizza (Post) --->Available (Custom Field Checkbox: Y if ticked - managed from Vegan Pizza in Available items in settings submenu above.
However, other pizza items need to be able to be displayed in query loop, so they need an available Checkbox Y
I think it is possible but it would need to create some custom code to do that. If you are familiar with coding can follow the suggestion below to create the code on your own.
- create a callback function and hook to the action mb_settings_page_load
- query to get posts of post type menu and update the field value by using the function update_post_meta()