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

How can I display a drop-down select of Post Names

the fourth argument should be the name of the custom post type, as defined when you created the post type. see http://codex.wordpress.org/Function_Reference/add_meta_box

For a clearer explanation of how to successfully create metaboxes, see this tutorial

the second argument should be the callback function, you can create the drop down HTML in a function, and place the function name in this argument and you’ll have your pull down menu.

Related Posts:

  1. Query all posts where a meta key does not exist
  2. Correctly delete posts with meta and attachments [duplicate]
  3. Storing revisions of metadata for custom post type
  4. Admin Area Custom Type Search By Meta Fields Without Title & Content
  5. How can I filter posts by post_parent in the admin?
  6. Custom Post Type with Input fields to seperate table on database.
  7. How to create a mini directory in WordPress?
  8. How Can I save multiple records in same meta key?
  9. Detect meta value changes when post is updated (post_updated)
  10. Search everything (posts, pages, tags, cpt, meta)
  11. Permalinks using event date (year & month) instead of publication date
  12. Compare 3 custom fields and sort by oldest
  13. Creating a custom post type upon registration
  14. Reason action hook won’t work with update_post_meta from frontend form? Alternative?
  15. Can’t sort order of wp_query with 2 meta keys
  16. Showing Meta Data for Custom Post Types?
  17. How to get source of custom meta image?
  18. Having trouble with custom post type / meta box
  19. Query for posts from any post type but only add instock products
  20. update custom post type meta from a shortcode
  21. Custom Meta Boxes – Nonce Issue – Move to trash issue
  22. Displaying Meta Box Image
  23. How to keep a check box in custom meta box for custom post type checked by default for add new post?
  24. Show metabox in custom-post-template depending on taxonomy term?
  25. ACF Upload Image in repeater from front-end with custom form? – add_post_meta()
  26. Using date stored as custom field to filter posts displayed in admin
  27. Meta Box Only in CPT Edit Page, Not in Add New
  28. get_post_meta is returning image id
  29. get_template_part() – post-meta not working?
  30. Metadata for a taxonomy – is there any WordPress way of doing this?
  31. Populate Custom Fields in a Custom Post Type?
  32. Insert Multiple Post with Same Publish Button
  33. Update CPT post meta with update_post_meta and cron job
  34. Custom meta box data array: foreach not working correctly?
  35. How to check if user meta field is empty in conditional else statement
  36. Get posts between custom dates
  37. A better way to add a meta box to custom post types
  38. Should wp_postmeta meta_key always be unique for a given post_id?
  39. How do I set all of a particular post meta to a value within the custom post type I’m in?
  40. Metabox not show in categories custom post type cmb2
  41. Storing a many to many post type relationship in post meta and keeping SQL ability for Joins
  42. Importing Data from a Non-WordPress database, into WP
  43. List Taxonomies: Don’t list taxonomy if it has no post – depending on custom post-meta?
  44. Can’t publish custom post type – “You are not allowed to edit this post.”
  45. Filter date from post meta when date is in string format
  46. Get only used meta_values
  47. Get $post->ID from a URL
  48. Displaying a div from an assigned meta_value when on a page
  49. Setting Post Title via Meta Data returns Auto-draft
  50. Filter posts by tax (dropdown) and meta value
  51. Custom post type suddenly stoped working after WordPress 5 update
  52. Batch Extract Date from post title and put into ACF custom field
  53. How to show custom field on specific custom post type posts only when filled
  54. How to handle this specific case of custom post type?
  55. Save CTP post meta different values each day without overwriting previous values
  56. is_main_query() never called on WP 4.4
  57. Meta box data is saved but NOT displayed in the meta box text field. Why?
  58. Related posts meta_query CPT
  59. Meta box with front-end styling
  60. Sanitaizing Select Optin For Custom Post Type Metabox in WP
  61. Cannot Save MetaBox Data in Custom Post Type
  62. Getting WordPress to store 0 values for custom post type meta
  63. Say I have a tech blog, how best would I store technical specs for a phone, if i use custom post types
  64. Hide title field of selected post-types on edit pages
  65. Get_post_custom not fetching value from array wordpress
  66. Save data is post using php front end
  67. How to keep custom post type related information
  68. Can’t save meta box data in WordPress using custom post types
  69. Creating a custom post type upon registration for a specific user role
  70. How to sort by multiple values in a nested WP_Query
  71. Where is get_post_meta value located?
  72. How can I use a custom template to load custom post type posts based on a post_meta value
  73. How do I create a customised table list of a custom post type (in the admin area)?
  74. How to properly get the wp_postmeta.meta_value of a custom post type in specifics?
  75. add action save post type and update post meta woocommerce
  76. get_post_meta not working with variable as a post_id for dynamically get the postid
  77. How to save post_status using action save_post?
  78. Custom post meta box as a sub form
  79. Metaboxes in Loop
  80. Add more custom fields when creating a new custom post type
  81. Custom meta box data not saving
  82. Collect custom post in a calendar
  83. Storing data in a multidimensional array from dynamically generated foreach loop
  84. How can I get the $key / $value pairs of custom fields that were added via 3rd party plugins or themes?
  85. meta query always fails even if data is correct
  86. Problem with ‘save_post’ hook not running
  87. Values inside a custom field to determine which category posts to display
  88. Display a post count from a custom metabox selection
  89. How to rewrite CPT-Permalinks the correct way (incorporating meta-box-data)?
  90. Custom post type submenu sorted by specific meta_key & meta_value
  91. Advanced search form with filters for custom taxonomies and custom fields
  92. Querying meta values within an array
  93. Post AND page parameter for WP function
  94. why get_post_meta is returning 0?
  95. Save post_parent in a custom post type
  96. How to display Author Profile based on Custom field value
  97. Automatically add custom taxonomy when meta value gets to a set number or beyond
  98. Display a list of posts whose meta field values are equal to the ID of the post being viewed?
  99. Check for custom field value in different post type than current one and do something
  100. I am having a problem with fetching product data in the Gutenberg block editor
Categories custom-post-types Tags custom-post-types, post-meta
digital alarm clock widget
Target pages using a specific page template

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