Title: Display : error with the_fields()
Last modified: June 21, 2021

---

# Display : error with the_fields()

 *  Resolved Anonymous User 18784701
 * (@anonymized-18784701)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/display-error-with-the_fields/)
 * Hello,
    I have a difficulty for display my custom fields :
    - When I use the_meta(), I see the name and not the label.
    - When I use the_field(‘name_field’), I see the custom fields of one post in
      all posts.
    - When I use the_field(‘name_field’, the_ID()), I see the good custom fields
      but with a number on the start.
 * [Vous pouvez voir ici l’exemple montrant ces résultats.](https://numerique-feminin.com/formation/)
 * I use a hook of my theme (Generate Press) to add this custom fields.
 * Thanks a lot
 * Adeline
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdisplay-error-with-the_fields%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [dan.stefan](https://wordpress.org/support/users/danstefan/)
 * (@danstefan)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/display-error-with-the_fields/#post-14577729)
 * Hi adeline8ope,
 * You can’t use the_ID() to retrieve an id value, you must use get_the_ID() instead.
   the_ID echoes out the post id.
 *  Thread Starter Anonymous User 18784701
 * (@anonymized-18784701)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/display-error-with-the_fields/#post-14578774)
 * Thanks a lot to explain my mistake.
    I don’t understand why I must specify post
   id for the_field and not for the_meta… Can you explain that ? Thanks
 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/display-error-with-the_fields/#post-14579122)
 * Hi @adeline8ope
 * As far as I know you also need to specify an ID for `get_post_meta` or any similar
   function.
    This is because these functions need context as to what meta from 
   that object to fetch.
 * Cheers, Jory

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Display : error with the_fields()’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/display-error-with-the_fields/#post-14579122)
 * Status: resolved