WordPress.org

Ready to get started?Download WordPress

Forums

get_post_meta problem (1 post)

  1. DougYITBOS
    Member
    Posted 5 years ago #

    HI foks -

    So I'm using get_post_meta to show some custom fields.

    It's working like a champ on the single post page.

    But...
    When I'm showing more than one result (the user wants to browse a category for example) the custom field is not rendered.
    I'm clearly still in the loop... me=confused

    Here's the code:
    Job Code: <?php $key="Job_Code"; echo get_post_meta($post->ID, $key, true); ?>

    Same code in both the single post template and the main index which is used when browsing a cat.

    Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.