Skip Navigation

[Resolved] Automatically set parent CPT when creating a new article

This support ticket is created 3 years, 6 months 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.

This topic contains 1 reply, has 1 voice.

Last updated by Silvia 3 years, 6 months ago.

Author
Posts
#2101325

Hello, here is my problem.
I am building a website for a client that is a sort of online memory lane for people and companies of my hometown. Anyone can write a post (story) about a person or a company that they know. I was thinking of using blog posts and connecting them to two different custom post types : persons and companies. Each custom post type has a few custom fields that indicate if the person is alive or deceased, if the company is still in business or not etc.
I have created a relationship of one to many between PERSON and ARTICLES, and between COMPANY and ARTICLES.
Since this website will be open to anyone that wants to contribute (they have to register first) I wanted to avoid giving access to the backend and make the contributor set the connection between article and person or company there, so I was trying to set thing so that in each person or company content template I would set a cred post link to a form on the front end that creates a new post directly connected to the cpt they want to write about. Is that possible? How can I achieve that?
I tried following instructions posted here https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/ but when I create a form the RELATIONSHIPS section doesn't appear, even tho I have created both relationships.

#2101355

I realised that the instructions at https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/ weren't working because I had inadvertently set a relationship of many to many. My issue is resolved now. Thank you!