Skip Navigation

[Resolved] Split: Coding Post Relationship (Parent of Child) – related CPT (Learning Partners)

This support ticket is created 6 years, 4 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 5 replies, has 2 voices.

Last updated by gabrielB 6 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#1118998

Hi Minesh,

I just realised that all I had to do was remove the following bit of code. That's done. Thank you so much.

	echo "<pre>";
	print_r($related_locations);

If it's possible, could you also take a look at the rest of my message? There were the following 2 points:

  • I can't seem to load the content of the related post. File: parts/course-location.php
  • I also need to display another related CPT (Learning Partners). In this case however I will have one Learning partner that has the Custom Category "Awarding Body" and another "Accreditation". I was going to call these separately. File: parts/course-accreditaion.php and parts/course-awarding-body.php

I can't thank you enough!

#1119001

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I also need to display another related CPT (Learning Partners). In this case however I will have one Learning partner that has the Custom Category "Awarding Body" and another "Accreditation". I was going to call these separately. File: parts/course-accreditaion.php and parts/course-awarding-body.php
==> Well - could you please share problem URL and access details with all required information what should be your expected output. Few screenshots will be helpful.

I have set the next reply to private which means only you and I have access to it.

#1119045

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please tell me where the following templates are applied?

 File: parts/course-accreditaion.php and parts/course-awarding-body.php

Could you please share URLs where the above templates are used?

#1119046
Screen Shot 2018-10-02 at 14.14.34.png

They're further up on the same page. course-content.php

So far I've managed to load them, but I want to apply the custom category.

#1119061

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you please check now. I've added following code to your templates:

File: parts/course-awarding-body.php
- In side loop - I've adjusted the code as given under:

if(!has_term('awarding-body', 'learning-partner-type',$learning_partner->ID)){
				continue;
			}

File: parts/course-accreditaion.php
- In side loop - I've adjusted the code as given under:

if(!has_term('accreditation', 'learning-partner-type',$learning_partner->ID)){
				continue;
			}

I can see - it's working. Could you please confirm.

#1119072

Minesh you're awesome! Thanks so much! My issue is resolved now. Thank you!