0

So I've tried this:

$output .= '<span class="team-member-venue">'.get_post_meta( get_the_ID(), 'venueofcoach', true ).'</span>';

Where venueofcoach is the metaname of the custom post field I created (with the WCK plugin). On the front end between the <span> all I get is the word "array".

Any clues as to how to fix this?

  • Seems like anywhere I put that I get a blank page I'm afraid... – lorenzium Jan 22 '15 at 9:45
  • 2
    Missed a ) at the end, sorry. Try again var_dump(get_post_meta( get_the_ID(), 'venueofcoach', true ) ); – Pieter Goosen Jan 22 '15 at 9:59
  • OK, I got this: string(0) "" – lorenzium Jan 22 '15 at 11:53
  • Is get_the_ID() returning the correct value or the value that you expect. Where exactly are you using this and how. – Pieter Goosen Jan 22 '15 at 11:58
  • No, but this is how the other lines are working to retrieve other fields like employee name and position. It is in a template for "employees"... (Jupiter theme: mk_employees.php (shortcodes/mk_employees.php) ) – lorenzium Jan 22 '15 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.