Given two custom post types: Automatically add meta fields from one custom post
-
Custom post type “Company” has:
-
Restaurant name field
Restaurant description field
..and other more fieldsCustom post type “Restaurant” has:
-
Restaurant name field
Restaurant description fieldHow can I make it so that whenever I add a new Company (the restaurant fields are filled out), it will automatically add a new Restaurant whose fields/details are the same with the newly added Company?
My idea is:
Whenever I create a new Company, I will add the restaurant details to a “restaurants” table in the databaseAlso, whenever I create a new company, I will get the latest entry from “restaurants” table and somehow append them to create a new Restaurant post
Is this even possible? If not or if you have another idea to solve the problem, please share.
Feel free to suggest multiple plugins if they manage to get the job done.
Providing an example would be extremely helpful. Thanks!
- The topic ‘Given two custom post types: Automatically add meta fields from one custom post’ is closed to new replies.