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

CPT posts in drop downed in meta box on page doesn’t return post ID

Forgive me if I am misunderstanding the question but…

So, when I get get_post_meta( $get_post_ID());

… you already have the post ID via $get_post_ID() (which is a BuddyPress function I believe) do you not? If so, you are making this far more complicated than it needs to be. get_post_meta() is only returning the metadata. Given that you already have the ID in order to use the function, there is no need for it to spit back the ID as well.

Related Posts:

  1. Passing error/warning messages from a meta box to “admin_notices”
  2. Add “upload media” button in meta box field
  3. get registered metaboxes by post type or post ID
  4. How to get meta box data to display on a page
  5. esc before saving or before displaying does it matter?
  6. Add a meta description to home page?
  7. Getting the ID of a meta box
  8. Check if meta key value already exists
  9. get_post_meta doesn’t work
  10. How do I display Youtube/Vimeo video ID on custom post type when user enters it in custom meta box?
  11. Metabox of one post influence setting on other
  12. How to store multiple input values with same meta_key
  13. Consolidate Metaboxes into 1 Big Metabox
  14. unable to save post meta on single field with multiple selects
  15. metabox upload file
  16. Why is variable value emptry in $_POST but available in $_REQUEST?
  17. Why does get_post_meta not work with the posts page?
  18. How to get meta box values – WP tuts tutorial
  19. Change the post date from a meta box
  20. update_post_meta and get_post_meta not working
  21. Repeatable custom meta fields
  22. how to save multiple checkboxes value in wordpress dynamically
  23. Using WYSIWYG In custom meta boxes
  24. Multiplicate entry on update_post_meta
  25. Undefined index error in custom post metabox
  26. Custom Meta box only returns most recent value on page
  27. How to prevent further updates of custom meta when using actions to set one meta based on another
  28. How to create a button click counter meta box?
  29. meta box & callback function
  30. $_GET & $post_ID
  31. How to I retrieve the ID from the Posts page?
  32. get_post_meta as a list for drop down search filter
  33. Parse a text area custom meta box and assign as value to existing meta keys
  34. Getting metabox value?
  35. Hide Page Title with Post Meta
  36. Save meta data with post, Without using any plugin [closed]
  37. Editor meta box Showing but not saving
  38. How can i get multi checkboxes value in metbox?
  39. Show value of select dropdown in meta box
  40. remove a single post_meta
  41. Echo 2 values from one key in Array with get_post_custom
  42. save radio button selection in post-meta on submit
  43. post meta – problem : copy the same meta for all the articles
  44. Custom Meta Data is not being saved
  45. Update Post Meta in Front End with a form
  46. Update Post meta with custom variable
  47. get_post_meta not working on my custom-function page
  48. update_post_meta doesn’t work
  49. Removing Meta Generator
  50. Only allow one meta key value per post in a category
  51. use post meta in add_meta_boxes action
  52. Custom meta box not saving values of radio buttons in WordPress
  53. Can’t save drop down select date in meta boxes
  54. update_post_meta does not work
  55. add_post_meta not saved
  56. when saveing $meta_box i get Undefined index error
  57. Updating post meta and Meta Box plugin
  58. Related posts and custom meta_box?
  59. Select Options Meta Data is Not Updating in Edit Meta Box
  60. How to display meta box data using “Meta boxes as needed”
  61. Metadata in loops
  62. Allow iframe in custom meta box
  63. Calling Data from Custom Meta Box
  64. How can i remove blank area caused by theme’s post meta boxes?
  65. Datepicker altField and altFormat to save a new meta key/value in a post?
  66. My meta box don’t want to save value
  67. Create more Meta Boxes as needed
  68. Set Default Admin Screen options & Metabox Order
  69. How to set default screen options?
  70. Add a Meta Box for uploading a SECOND Featured Image?
  71. Does WordPress have a “Form API”?
  72. Metabox with checkbox is not updating
  73. How to HIDE everything in PUBLISH metabox except Move to Trash & PUBLISH button
  74. What is the “Advanced” $context in add_meta_box?
  75. Removing panels (meta boxes) in the Block Editor
  76. Change The Title Of a Meta Box
  77. What is the index [0] for on post meta fields?
  78. WordPress SEO by Yoast: Hide Meta Boxes in Posts for Non-admins
  79. How to make open/closed and hidden/shown metaboxes status saved on a per-post basis?
  80. How To Remove The “+ Add New Category” Link From A Category Metabox
  81. How can I create a taxonomy meta-box with search suggestions but no new terms input?
  82. Remove the Featured Image Meta Box
  83. Remove the Yoast SEO Post Metabox [closed]
  84. Best practices for meta box placement?
  85. Creating a metabox to upload multiple images
  86. How Does WordPress Remember Metabox Positions?
  87. Sample code for validating custom metabox?
  88. Post custom metabox textarea using wp_editor
  89. How to Add Reminders/Notes to New Post Meta Boxes
  90. How do I get attachment_id?
  91. Removing Metabox for “Slug” without removing functionality
  92. post formats – how to switch meta boxes when changing format?
  93. How to reorder meta box position?
  94. Prevent sorting and dragging of specific postbox metabox
  95. One metabox for multiple post types
  96. How can I retrieve multiple get_post_meta values efficiently?
  97. How do I position meta_box on post edit screen after the title?
  98. How to add a class to meta box
  99. Custom field metabox not showing in back-end
  100. Has anyone successfully integrated qtranslate with custom metaboxes?
Categories metabox Tags id, metabox, post-meta
how to goto specific page number including title with permalink
Fire an event after Featured Image selection

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