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?
- Query posts by Author and/or by Tag
- Get post meta retrieving wrong value
- wpColorPicker – problem with implementation to post meta
- Edit multiple custom post types while saving a new or edited post
- Change post author without using wp_update_post()
- WP_Query: getting posts where custom field exists
- wp_query with ajax
- Update post meta within save_post action
- Display post number by category
- Output Post with ACF Fields into other Post
- change order of images attached to post
- Updating post meta for checkbox
- Add two custom fields as a default to the “new post” page.
- Custom permalink for each post
- How can I tell if a post has been published at least once?
- Is there a way getting post fields using `transition_post_status`
- Automatic blog page with custom design [closed]
- After ajax image is outside the “ tag
- Edit custom fields in posts list
- Show number of posts by logged in user
- How does WP decide how to display a page
- WP_Query custom field pass the post id
- When sending a newsletter -not with wordpress- the server has 100% cpu [closed]
- Retrieve data from post meta meta_key having ‘_product_fq_image’ while having author_id and post type is PRODUCT
- Insert data from custom created PHP page into wp_postmeta table
- Adding a meta box to determine the sidebar [closed]
- The loop starting at a certain ID
- If custom field is empty, use one from a previous post
- Simple Custom Metabox Not Saving
- Get post category as a separate string and url
- Why my meta boxes won’t show in front post page?
- Adding external field to my post form (admin side) and to post show (frontend side)
- How To Use Custom Fields With .mp3 Links
- how can display a post on home screen without images
- Display content between two dates?
- 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?
- How to save template data into wp_post table (post_content column)
- Is there a way to make [Table Of Content] plugin while not using revision data?
- Override WordPress core post-template.php block template
- Get other posts sharing the same meta values
- 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 do i create a custom post query when the meta value is an array?
- Custom Fields – How to get the list of a specific active widget each time it rendered
- How to bulk Update URLs to new values?
- Select another post in a post meta like a parent page is selected while editing a page
- SQL DELETE multiple post_meta on single and multi-sites
- How to improve my non-unique metadata MySQL entries?
- Trouble with serialized metadata
- Unable to gather Image URL from Custom Post Type’s; Custom Meta Field
- Adding an option to post editor to show a site disclaimer or message
- Saving canvas generated image when saving post causes 404 error
- Private post caught in endless redirect loop
- How to mark only one post as Featured post?
- How to retrieve all meta data directly from the $post object? Such as $post->related_topics?
- What is proper filter or hook action to add data to the $post object?
- Need to display a Jan 1st post as the site’s front page on Jan 1st, and Jan 2nd post as front page on Jan 2nd etc
- Query against multiple locations within single custom post type post
- Blogposting Schema & Structured Data without plugin
- Automatically select template based on query string for New Posts
- Display Updated Date Instead of Published Date
- Is there a way to save different data when USER interacts with the same POST?
- Get post by two meta key but order by one of them
- Mix post date with post meta value using WP_Query
- Add postmeta to all blog posts
- 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
- Bulk Post update_post_meta
- Re-order Category Meta-data
- How to hide meta from search result only on pages?
- How do I display posts ordered by a date custom field?
- WP_Query to get posts in a specific tag or has post_format
- Grab meta data before post is saved
- How to create frontend Post filter using meta query
- How to fetch posts that are stored in the different table than the default table (wp_posts)?
- Check if user has avatar
- alt of attached image in post / pages