Skip Navigation

[Resolved] I need a frontend solution to connect or add new posts

This support ticket is created 4 years, 2 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Shane 4 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#1843339

Hi

I have two custom post types.

a. Search post type
b. Horse post type

The idea is that a user can post as many horses as he/ she wants and can post as many searches as he /she wants.
The user's search post types are public visible.

If he/she wants he/she can "apply" a horse (one of his existing horses or a new) to a search of another user (user 2). So in the post relationship form it should be possible to ADD a new horse or select one of the user's existing horse post types.

That user 2 (owner of the search post type) will then see the relationship and be able to SEE the horse post type of the other user (user 1).

#1843519

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Bram,

Thank you for getting in touch.

"So in the post relationship form it should be possible to ADD a new horse or select one of the user's existing horse post types."

It is only possible to add existing posts to a relationship using a relationship form. If you want to give the user the option to create a new post and add it to the relationship then they will need to do this through a regular post form.

The Relationship form is only for setting existing posts in a relationship. Essentially to achieve your goal you will need to use 2 forms.

Please let me know if this helps.
Thanks,
Shane

#1844575

Hi Shane

Ok thank you (I thought it was possible as you can do it in backend).
So but then, how can I connect an existing horse with a search post type in a frontend?

as an extra ; Can. I make a form that automatically connects a horse with the 'current' search (if you add the form in the search post type singel)

#1846117

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Bram,

"how can I connect an existing horse with a search post type in a frontend?"

Meaning if you're searched for a post on the frontend and what to connect it to an existing horse after you've searched for it ?

You should be able to do this by following the instructions in the link below.
https://toolset.com/course-lesson/front-end-relationship-forms-for-connecting-posts/#using-the-post-relationship-form

I make a form that automatically connects a horse with the 'current' search (if you add the form in the search post type singel)

No you won't be able to automatically connect the posts based on the search. What you can do is to click to the page that you want to connect and add the relationship form to that page's template and it should allow you to connect that specific page to any horse that you are searching for in the form.

Thanks,
Shane