WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Pods to set up custom post types.

I have two custom post types: Car and Garage. In Car I have set up a relationship field with Garage, so when editing a Car post I can select one of the Garage posts available from the drop-down.

When viewing a car post I would like to display the name and the link to the garage post selected. How would I do that?

Usually I would do like

$field = get_post_meta( get_the_id(), 'garage_name', true );
echo $field;

in template, but in this case I only get "array".

share|improve this question

closed as off-topic by toscho Aug 18 '14 at 10:52

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Happy to oblige, but there are around 80 Pods related questions here. PHP - yes, but very much how to use WordPress functions in WordPress templates. – BoBoz Aug 18 '14 at 14:25
How does this work? Do I argue for my case or just copy the question to another Stack Exchange site? – BoBoz Aug 18 '14 at 17:38
Also, I think this question is mostly about Custom Post Types. Eg "I have two custom post types". Pods is just the GUI I'm using to set them up. – BoBoz Aug 18 '14 at 20:42

Browse other questions tagged or ask your own question.