Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

What WordPress function to use to get meta value by using meta keys?

As the solution suggested in comments worked out for you, I’ll just post that as answer over here.

You need to replace the_ID() function in your get_post_meta(the_ID(), 'nova_price', true); call.

Because the_ID() directly outputs the post ID which is then getting printed for you instead of the meta.

Right code would be:
get_post_meta( get_the_ID(), 'nova_price', true)
This should get you the value for nova_price for the given post.

Related Posts:

  1. How to change text color depending on the number value (Using javascript)
  2. Add options to featured image
  3. Assign category using custom field?
  4. Default Custom Field Value Automatically Update
  5. Prevent custom field from being updated after first publish
  6. Reference multiple style sheets, clearing styles for permalink page, custom fields for css
  7. Creating a “Related Meta” type field?
  8. update_post_meta not working in function
  9. Add custom fields after post/page title
  10. Adding and updating repeating custom field meta data
  11. How to display custom field in woocommerce orders in admin panel?
  12. Programatically add options to “add new” custom field dropdown
  13. Get a list of all available fields in the User Profile
  14. Enabling shortcodes for custom fields
  15. Detect meta value changes when post is updated (post_updated)
  16. Search everything (posts, pages, tags, cpt, meta)
  17. Change meta tags programatically
  18. Authors details such as social media links, emails etc → Is this Meta or something else?
  19. Use a function to update post meta based on other post meta
  20. post meta data clearing on autosave
  21. update_post_meta for custom field not working upon form submission
  22. How to break meta values into different items and avoid duplicates?
  23. How can update custom meta for all posts
  24. Function to Download External Images to My Site
  25. Checked() showing up twice in custom fields
  26. Convert User ID’s to User Names in a single.php file
  27. How to use max and min values of custom fields
  28. Woocommerce Storefront WordPress Ignore Media Gallery Images and use External 3rd Party Host
  29. Customizer field value into functions.php variable
  30. Can’t check if a post has thumbnail adding filter to get_post_metadata()
  31. Auto delete post if certain custom field data is empty
  32. How to wrap meta values seperated by comma in ? [closed]
  33. Run a check for multiple meta key values
  34. Move Post to different category if post_meta field is 0 or is 2 days old?
  35. How to display custom option field in woocommerce orders in admin panel?
  36. How to add a slide toggle to the Woocommerce-Layout__Activity-Panel area in the orders admin page
  37. How to VAR_DUMP a $variable during checkout process (Is my product meta callable?)
  38. get_post_meta not working on publishing
  39. Removing custom meta data
  40. Change label for registration Fields
  41. Custom Attachment Caption Fields
  42. Post meta not updating
  43. Function to update post_meta based on existing post_meta
  44. WordPress function saves a post twice and updates all posts
  45. ACF not showing
  46. Exclude from the query posts with meta_key and meta_value
  47. How to retrieve the values of a sub-field in the first and last row of an (ACF) repeater inside function?
  48. How to get correct value from checked()?
  49. Get array of metakey in all posts
  50. Custom Behavior when Adding New Custom Post Type in Dashboard
  51. User function to return multiple get_post_meta()
  52. IF Custom field value equals ZERO
  53. Hide custom fields when empty
  54. What are the meta fields for an attachment?
  55. Programmatically add Yoast meta description after post save
  56. Update post meta custom field using block editor
  57. Insert Address fields into function
  58. How to make custom comment fields required
  59. How add body_class from wp_termmeta
  60. How do I display a date correctly that is stored in the database as a backwards 8 digit number from Advanced Custom Fields? [closed]
  61. Sort and display pages with specific custom field (not tag)
  62. shorthand syntax for custom fields
  63. Fill empty custom field with other custom field
  64. Hide a div when a custom field is empty
  65. saving/reading custom field value does not work – no value gets POSTed
  66. updating one custom meta field only
  67. Perform function on publish AND save (not just save)
  68. How to avoid saving empty data to sql while using add_meta_box
  69. How to Display WooCommerce Product Price in WooCommerce Archive
  70. Show metadata in users.php – wordpress
  71. How to add custom metakey to shop_order page’s searching function?
  72. wp_set_object_term via js btn frontend
  73. Populate Product Regular Price with a calculated ACF Field Value
  74. Set class if a meta value is set within post archive
  75. Update wp_postmeta table based on 2 keys
  76. blank page with wp_get_attachment
  77. How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?
  78. Create New User Custom Field not Saving
  79. How To Display Author Popup on Entry Meta (Genesis Framework)?
  80. How would I correctly implement a new if statement in a child functions file?
  81. Hide empty custom field
  82. Remove post from latest posts after a month only with certain tag
  83. save_post doesn’t correctly process function call with php class
  84. How To Show Shortcodes In WordPress Custom Fields?
  85. Return ACF Field value function
  86. How to echo the translated custom field?
  87. How to add function to custom fields when page/post has a password?
  88. How to exclude posts with empty and non-existent relational custom field with meta_query?
  89. Post date on Custom field
  90. Dynamically generated Navigation Diagram using Custom Fields
  91. Define an extra field for all pages (with no plugin?)
  92. Adding custom field in menu options [duplicate]
  93. Sorting Posts with meta value not working
  94. How To Get WordPress Categories Last Update Date?
  95. How to add a meta information to the URL?
  96. Automatically add custom fields (post_meta) to all published posts, hourly, via wp_cron?
  97. Automatically delete posts based on query
  98. How to display data from custom fields in my custom shortcode?
  99. Syling Custom Fields echo’s from from functions.php
  100. Custom Field: Display only if a specific key is selected outside the loop
Categories functions Tags custom-field, functions, meta-value, post-meta
Remove /product/ from url. I want only category name then product name
Customizing NEXTGEN Gallery To link images to pages

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress