Display Title and URL Link of Related Pages (Relationship Field) using Each

I have a CPT, “Volunteer Opportunities” (volunteer_opportunity) which uses a Relationship Field with multi-select. This allows me to mark which Pages the volunteer opportunity is related to.

For example, the Volunteer Opportunity called “Food Pantry Support” would be related to two program Pages (normal pages, not CPTs): “/metro-food-pantries” and “/rural-food-pantries”

On each Volunteer Opportunity post, I want to display a list of each related Page, and include the URL to that page. That way, for example, a volunteer could see which of our programs the volunteer_opportunity “Food Pantry Support” is related to, and click to go learn more about those programs.

I took a look at this documentation page which says “By default, Pods will not link to the related object URLs when displaying. If you want to do this, you can look at field() or using [each].”

I’m trying to use the Each loop but don’t know what fields to call.

This is an Elementor Pro site and I am building a single post template for the volunteer_opportunity CPT.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer