WordPress.org

Ready to get started?Download WordPress

Forums

archive template won't show custom fields (2 posts)

  1. salisbury
    Member
    Posted 2 years ago #

    Hello,

    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.

    John

  2. vtxyzzy
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic