Support » Fixing WordPress » archive template won't show custom fields
4 years, 8 months ago
I am writing a custom archive template to display the details of the magazines and journals published on a specific subject in a given country.
The template should display a thumbnail and description excerpt for each title, together with some custom field values, but the page won’t display any of the custom field data.
What’s wrong with this code?
[ Code moderated. For more than 10 lines of code please pastebin.com instead. ]
The actual output is shown at http://www.aeroflight.co.uk/?p=16034&preview=true
Any help with getting the meta data displayed would be appreciated.
You are using the return from get_the_id() as an object, but it is just an integer. Try replacing all occurrences of $str->ID with just $str.