Navigation überspringen

[Gelöst] The right slug to use for making relationship mandatory and showing an error on

This support ticket is created vor 3 Jahre, 10 Monaten. 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 -

Zeitzone des Unterstützers: America/Jamaica (GMT-05:00)

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

Zuletzt aktualisiert von himanshuS vor 3 Jahre, 10 Monaten.

Assistiert von: Shane.

Author
Artikel
#2169771

I am using backend code to prompt user to create a parent before creating a child post but I am having difficulty using the right slug. Can you please tell me the format of the post relationship slug?

relationship slug = company-to-job

Here is my code

           // check if company id exists
        if ( empty( $fields['wpcf-@company-to-job_parent']['value'] )) {
 
            $errors['wpcf-@company-to-job_parent'] = 'You must create company profile before creating a job';
        }  
#2170051

Shane
Unterstützer

Sprachen: Englisch (English )

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

Hi Himanshu,

Try using
"@company-to-job_parent"

Thanks,
Shane

#2171479

My issue is resolved now. Thank you!