meta_id
in postmeta
table is just an AUTO_INCREMENT id for the table, you can easily inspect that:
So, your guess is correct, you can leave it.
EDIT
Avoid raw SQL statements and introduce $wpdb
for SQL purposes. And for postmeta insertion you can see the following tutorial I found a best one:
Related Posts:
- Update all posts automatically when using post_meta
- Better post meta efficiency?
- Change post format using custom field
- Sanitizing `wp_editor();` Values for Database, Edit, and Display
- Exporting Data from WordPress into a flat table
- Add custom field automatically (add_post_meta) with value based on number of words of article
- How can I sort posts by the date and a custom meta field?
- Cannot retrieve a custom RSS field from posts
- Customize rel=canonical tag for single blog post
- How to I retrieve the ID from the Posts page?
- if in category but only with post meta
- Saving Post Data in Another Database
- Add multiple meta keys to a post at once
- saving/reading custom field value does not work – no value gets POSTed
- Post meta not working
- Show posts from WP Custom Post Type selected from a field in a metabox
- How do you update post date (year only) in a separate custom field?
- WP_Query sort by meta_value_num or date
- Creating Ordered Query using Meta_key
- How enter custom post meta or custom field on box post list archive page?
- How to check if post meta key exists or not in wordpress database
- How set featured posts using checkbox in post edit screen?
- Getting attachments by meta value
- Convert custom fields to post categories
- How to batch update post content with custom post meta value
- Setting post meta data to random value during post status transition / on publish
- Add custom field to all posts in specific category
- meta_box or custom_field as a second tinymce post-instance?
- WordPress altering my custom query, How to fix it?
- Create A Metabox For A Custom Field
- Possible to create a permalink to sort with meta_key?
- Does WP get all post_meta on POST page?
- Populating a page with content from post custom fields
- How to add a custom field after wp post
- Which is best in the following scenario : post_meta vs custom table vs parent/child posts
- Custom fields on a virtual page
- Get a custom field of all posts on current blog page
- How to permanently delete a post meta entry?
- How can I get a post field value using javascript?
- Automatic value for custom fields for posts
- I would like to give special promotion for the first 100 posts in my blog? Can anyone tell me how to do that?
- Converting a dynamic piece of code using WordPress Loop into a static one using Post ID
- Get Meta Key Value While Saving Post
- Fetch Record based on meta key dates
- How to display Common posts from specific Tag & Category with Shortcode
- Force the “Choose from the most used tags” meta box section to always be expanded
- Automatically add custom fields value to wordpress post
- Meta value does not save for scheduled posts
- Large AND OR query timing out
- MySql query to get posts with all meta and terms
- How to compare two posts including their meta fields on a scalable base?
- Is it possible to paste a link without tags and make it directly a link in a post?
- Query Posts With Over 1000 Views
- How to automate featured posts number? [duplicate]
- Ordering posts by custom field named “date” in backend
- Unique meta_key with array value vs repeated meta_key with single values
- Is it possible to retrieve all posts with a certain value for metadata?
- How to rate a post from Admin Side / Manually?
- How to save meta checkbox WordPress
- wpColorPicker – problem with implementation to post meta
- Update post meta within save_post action
- change order of images attached to post
- Add two custom fields as a default to the “new post” page.
- Custom permalink for each post
- Is there a way getting post fields using `transition_post_status`
- The loop starting at a certain ID
- Why my meta boxes won’t show in front post page?
- Will multiple category descriptions effect my search engine optimization?
- Automate post update for all posts?
- What snippet do I need to type to show my ACF field show up on my theme?
- Is there a way to make [Table Of Content] plugin while not using revision data?
- Only the most recent post is showing on my category page (working on localhost, not live site)
- Post picker custom field on page
- Featured Images most often doesnt appear
- How to bulk Update URLs to new values?
- SQL DELETE multiple post_meta on single and multi-sites
- How to improve my non-unique metadata MySQL entries?
- Trouble with serialized metadata
- How to retrieve all meta data directly from the $post object? Such as $post->related_topics?
- Query against multiple locations within single custom post type post
- How to get value of a selected option from select tag and use it in WP_query to filter posts?
- When working with a post, almost all wp_postmeta are deleted
- Auto populate custom fields by post date
- Best Way to detect unique posts in wp rest api
- ACF Relationship – Get Parent’s Post Object
- post_name is not stored until post is published… where should I store my slug until it goes live then?
- How can I set and update the the_date according to a custom field of the post
- How to retrieve a post by inputing the url in a custom field and displaying it on an options page
- Custom fields in normal posts
- Show posts between two Custom Fields date
- WP Query between posts custom fields [duplicate]
- Ordering posts alphabetically by meta keys and title
- Where should get_post_meta() go to get $post->ID get_post_meta() is empty and $post->ID & get_the_id() are working
- get_post_meta property of non object
- Querying meta values within an array
- How do I insert a custom field in a user submitted post?
- How to make a local “scroll to ID” on post?
- If meta_key exists then don’t select this post?
- Check for custom field value in different post type than current one and do something
- Translation related post text to Arabic