Link to related CPT

Hi, I have two Pods setup

Branches
Services

These use a bi-directional relationship. On the branch page I have a list of all the various services that they provide.

If the visitor clicks through to one of the services pages, how do I create a link back to the original branch page?

Thanls,

Mark

Hi Mark,

If I understand correctly what you want to achieve this isn’t possible as we don’t have a parent page field connection which you could use to create a link back.

Best course of action would be to either speak to the Pods team and see what they recommend or add a breadcrumb. See the KB article below.

https://kb.wpbeaverbuilder.com/article/605-add-yoast-breadcrumbs-with-beaver-themer

Thanks Danny. I suppose I could use the posts module with a custom layout. Since there is only a one to one relationship I think that would work. Seems like overkill though.

Will ask the question I the Pods slack channel.

Thanks,

Mark

Hi Danny,

Found my solution in the end, so thought I’d share here in case anyone else ever needs something similar

My solution was to add an html module with the following code

<a href="[pods]{@service_area.permalink}[/pods]">[pods]{@service_area}[/pods]</a>

This uses Pods Magictags to reference the permalink of the related pod.

Thanks,

Mark

2 Likes

Awesome and thanks for sharing!