Skip Navigation

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

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 2 replies, has 2 voices.

Last updated by himanshuS 1 month ago.

Assigned support staff: Shane.


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';


Languages: English (English )

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

Hi Himanshu,

Try using



My issue is resolved now. Thank you!