Navigation überspringen

[Gelöst] Form to add testimonial for Advisor (custom post type)

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:

How to setup child post form?

Solution:

You can follow our document to setup the child post form

Relevant Documentation:

https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/

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

Zeitzone des Unterstützers: Asia/Hong_Kong (GMT+08:00)

Dieses Thema enthält 8 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von WilliamM1564 vor 4 years, 2 months.

Assistiert von: Luo Yang.

Author
Artikel
#2315329

Tell us what you are trying to do?
I am trying to create an Add Testimonial form to create a Testimonial for a specific advisor. I would like to display the form at the bottom of the Advisor template.

For the moment, I am trying to create the form correctly. I see I can add a field for the Advisor / Testimonial relationship, but I would rather have the testimonial attach automatically to the current advisor.

Is there any documentation that you are following?
No.

Is there a similar example that we can see?
I want the option to add a testimonial for an advisor from the Advisor's page (custom post type).

What is the link to your site?
versteckter Link

#2316053

Hello,

How do you setup the post type relationship between post types "Advisor" and "Testimonial"?
If it is one-to-many relationship, you can follow our document to setup the child post form:
https://toolset.com/course-lesson/selecting-parent-posts-when-using-forms-to-create-child-items/
section "Creating Forms with a Parent Post Preselected"

#2316797

It is one-to-many. That is one Advisor to many testimonials.

I see how this would work if I were not using Divi for the content template for Advisors, but I am using the Theme Builder in Divi.

How do I create a form like this and call it up in Divi?

#2316965

You can use Toolset shortcodes in Divi builders, for example, create a content template with classic editor, setup the child form link with toolset shortcode, copy/paste the toolset shortcode into Divi builder, it should be same workflow.

Since I don't have a Divi theme copy in my localhost, if you need more assistance for it, please provide a test site with the same problem, I can setup a demo for you.

#2317955

I can login into your website, will update here if find anything

#2317959

Yes, you are right, you need to put the child post form in a page.

I have setup a demo in your website:
1) Create a new page "Create child Testimonial post":
versteckter Link
Display the post form "Add Testimonial "

2) Edit the content template "Template for Advisors":
versteckter Link
Insert a Toolset Fields and Text block, and get the child form link shortcode:
<p>[cred_child_link_form form='597' text='Create new Testimonial' target='_self']</p>

You can use above shortcode into Divi builder to display the child form link, and use custom CSS codes to hide the parent select in "Add Testimonial" post form

#2318163

Oh! Now I get why we had to put the form in a page, because it actually comes up in another page. I thought we were embedding the form in the Advisor template.

Is there a way to embed the form in the actual Advisor page rather than having to go to another page?

Neue Threads, die von Luo Yang erstellt wurden und mit diesem verbunden sind, sind unten aufgeführt:

https://toolset.com/de/forums/topic/is-there-a-way-to-embed-the-form-in-the-actual-advisor-page-rather-than-having-to-go-to-another-page/

#2318179
#2318209

My issue is resolved now. Thank you!