Forums

Custom Field Retrieval (2 posts)

  1. RockyMtnHi
    Member
    Posted 5 months ago #

    I am using this code to retrieve custom field values and they are not being retrieved:
    echo get_post_meta($post->ID, 'quote', true);

    Is there anything special about how to do this? It am using this method successfully on other sites.

    Thanks in advance for the help.

  2. vtxyzzy
    Member
    Posted 4 months ago #

    The syntax you showed will work inside the Loop where the $post object is available. If you want to use it outside the Loop, you will need to supply the ID differently.

Reply

You must log in to post.

About this Topic