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 to store multiple custom meta box

I think it has nothing to do with wordpress.
Shouldn’t this question be on stackoverflow?

HTML:

name="quest_title[]"
name="quest_desc[]"

PHP:

foreach($_POST['quest_title'] as $key => $title)
{
    $desc = $_POST['quest_desc'][$key];
    //Here do whathever you want with this $title and $desc.
}

Solution: use empty brackets at the END of the name tag.

Related Posts:

  1. If custom field doesn’t exist, or exists and it’s true show title?
  2. How to update custom fields using the wp_insert_post() function?
  3. How to display multiple Post meta_key/meta_values by SQL query
  4. How to use multiple query with same meta key
  5. How can update custom meta for all posts
  6. Use ajax to update_post_meta
  7. how to increase custom post value by one most efficiently?
  8. How can I create a list of page titles from custom meta values?
  9. Store multiple custom field as post meta per post(css, js, html, 2 link) [closed]
  10. How to VAR_DUMP a $variable during checkout process (Is my product meta callable?)
  11. Need Help Fixing My Iframes [closed]
  12. Trying to retrieve post meta
  13. Is it possible to retrieve all posts with a certain value for metadata?
  14. Saving zero in meta box
  15. Non-Closing PHP Query in WordPress Loop
  16. Find a way to retrive data updated through metabox plugin to web page
  17. Why does this update_post_meta function not delete the custom field itself?
  18. how to get serialized post meta
  19. WordPress loop by meta key that is an array? and how loop multiple arrays
  20. Order a WP_Query by meta value where the value is an array
  21. Add a custom class to the body tag using custom fields
  22. Define category ID using get_post_meta
  23. Unable to Call More than One Meta Box Output
  24. Hide a div when a custom field is empty
  25. Post meta select input, if statement
  26. Display background color or image with custom meta box?
  27. Meta boxes only displayed when editing normal (default wp post_type) posts
  28. WordPress stripping out custom field tags
  29. Order category posts by last word of custom field
  30. Add a “custom field” to a category that can be retrieved when viewing the category page with get_post_meta
  31. How to update custom fields when post is published?
  32. Unable to update the meta boxes with multiple fields
  33. WP post meta – for loop inside for loop
  34. When working with a post, almost all wp_postmeta are deleted
  35. Updating Lat and Lng of posts automatically gives sporadic results
  36. meta field for numerous links
  37. Custom fields changes the formatting of metabox input
  38. WordPress AJAX load post metadata in modal
  39. custom field meta-box with dropdown/autocomplete
  40. Where can I find the code for the menu page meta boxes?
  41. PHP Puzzle: Unique Styles with PHP loop
  42. Display custom meta box in my template file
  43. Metadata on the WP_Post object
  44. WordPress – Display array data of a child
  45. Assign / update custom field value for all posts (How can I assign only to posts without custom field value?)
  46. wordpress allow user to edit user profile with custom fields
  47. Why do WP_Query results change after updating unrelated Advanced Custom Fields (ACF)?
  48. Sort custom meta column by other meta value
  49. A better way to add a meta box to custom post types
  50. Creating user status mode in WordPress
  51. get_post_meta not working on publishing
  52. Need help with Google drive API [closed]
  53. Remove metabox from WordPress menu editor page?
  54. Firing schema via code in functions.php doesn’t work
  55. MetaBox body is not showing (the callback function)
  56. Adding number to date not working [closed]
  57. How can I add extra word in permalink when someone click download button?
  58. Saving and Restoring a Canvas on A Individual User Basis
  59. Seach custom post type posts only by meta fields?
  60. How to use thumbnail size of image if I’m only using src to get image
  61. 3 Slashes appear after Apostrophe in custom fields after updating product-site
  62. how to retrieve a value if a checkbox is checked
  63. Trouble checking if custom woocommerce checkout field is empty or not
  64. Two queries for a WP_User_Query search work perfectly apart, but not together
  65. Button inside Custom Meta Box triggering the Update Button
  66. Why is my Custom Meta Box Field Inputs NOT saving?
  67. Archive post by meta value + 24hours
  68. auto-populating custom nav with all items from custom post type
  69. Add / Update Custom Fields After Select Pictures in Media Window
  70. WordPress update_post_meta updating with empty meta_value field [closed]
  71. conditional logic for front-end custom field edits
  72. get_posts in meta box dropdown not showing latest posts
  73. Automatic Shortcode Creation with Custom Fields [closed]
  74. Custom field values to taxonomy terms
  75. can i fetch a custom metabox data in another page or post type?
  76. WordPress from url get external source title
  77. How can you include custom post meta in search without calling each key?
  78. How would an if statement surrounding a custom field with two variables (holding values) look like?
  79. Display Custom Meta Box Field Only If Value is Present
  80. How to add specific meta tags to head of cart and checkout pages in woocommerce?
  81. Add additional field to custom post_type
  82. Limit checklist by the current user
  83. Custom Field IF/ELSE PHP
  84. Which PHP page is the Default Posts Page
  85. How to convert select to HTML with PHP tags inside of it [closed]
  86. Sanitizing text fields in array
  87. How to combine 2 php functions into one function with a custom field
  88. Remove the last X characters of a custom field value
  89. Advanced Custom Fields – display label and value only if value entered
  90. Get post id within comments loop
  91. shortcode in a custom metabox
  92. Show meta box only for default page template
  93. Illegal string offset in PHP function
  94. Why are the details of my todo not saving?
  95. How to I retrieve the ID from the Posts page?
  96. How to check if a PHP string is different than meta field?
  97. Can’t save php string to a custom field
  98. Display custom field on 404 page outside loop
  99. How to show/hide php table rows based on the content of custom fields
  100. Run str_replace on title and save the output to a custom field
Categories PHP Tags custom-field, metabox, php, post-meta
Adding top level items in the admin menu that link to a post
How do I show breadcrumbs when sidebar is not applied?

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