The question: what is the easiest way to convert standard posts with custom fields into a new custom post type
There’s no “easy” way. Consider that all posts have custom fields (some are hidden, and WordPress will add them). So you would need to convert post types based on the presence / value of specific custom fields.
This is not easy. It is doable with some SQL skills, but not “easy”.
AND to import/keep the data originally assigned to each post from the custom field into the native field of a new post type? Can this be done automatically?
Changing post type means to change a column in the posts table. As long as the post ID column stays the same, the custom fields in meta table will stay unchanged, so you don’t need to do anything to keep the data originally assigned to each post.
But as said above, there’s no way to do it automatically, you’ll need to run some SQL query on the database.
Related Posts:
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- Filtering a WP_Query meta_query by numeric values isn’t working
- Automatically fill custom field value on post publish/update
- Right way of storing large number of custom post fields
- Filter a custom field based on selection of another custom field (ACF) [closed]
- Custom post type or just use custom fields
- ACF Relationships in Custom Post Type Permalink
- How to sort a table of custom posts by column containing custom field
- WordPress Search documentation: how to improve search query using taxonomy terms, custom meta fields?
- Use Custom Post Type as Custom Field
- Using posts and postmeta table to store custom Address Book Plugin data
- Display posts if a custom field value is equal to another custom field value
- ACF Upload Image in repeater from front-end with custom form? – add_post_meta()
- Get Custom Field Values by Another Custom Field in WordPress
- How to Display ACF Relationship Custom Field as Link to Specific Custom Post?
- Query Custom Post Types by date (custom field) range
- Custom Post type and Custom Field WP_Query
- WP All Import – Using Xpath to set a select value
- How to change post featured image using a custom field of category?
- Sorting custom post type columns with external data and without meta values
- Retrieve value of a category’s custom field
- How can I dynamically add a post to a custom post type which uses a custom field?
- Bulk Update Custom Fields for Custom Post Types
- WP_Query order by custom field, then randomly order some of results
- Query custom post type with ACF Date
- Store CPT ‘Reviews’ average ratings to a WordPress DB table or to a DB custom table?
- Meta Query Not Returning Output Despite Having Matching Values
- ACF From & To Date Validations
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- How to render a custom post type template with custom fields using shortcode
- Order Custom Post Type by Custom Field Value
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Multiple Frontend Filters Using Advanced Custom Fields
- Integrate Custom Post Type Events into Calendar
- Displaying custom field according to date
- Importing Data from a Non-WordPress database, into WP
- WebP Fallback for Inline Background Image in Style Attribute
- Query based on custom fields start and end date
- Specifying meta field’s column type in Database using add_post_meta
- How to get a custom type post data when it has a connection with another custom type post?
- List of users that clicked a ‘Join’ button at single post
- How to inherit field value from parent post into in child / sub post
- Custome fields not displayed
- posttype and custom fields on multisite
- How do I get_the_postID() for a custom post that uses ACF repeater field?
- How do I replace the post title with a custom field?
- Sum and count of custom field values
- Group by custom field value (start and end times)
- Custom post types, disable fields
- Ideas to connect external database table to wordpress posts as custom field source
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- delete duplicate meta_value with same post_id
- Automatically add a character to field in edit post page
- Excerpt length: get first paragraph
- ACF – Retrieve custom taxonomy from a relationship field
- Create if else for post types in WP_Query ‘post__in’ values
- when looping through custom post data not appearing
- custom post types, custom fields and normalization
- Display Custom Field or Custom Taxonomy in front page /post/product
- How to access repeater field of a custom field?
- Filter posts by their related field’s custom field
- filter using custom fields
- Create 3 Levels of relations with WordPress
- How to replicate data storage and querying using WordPress. Custom posts/fields or Custom db tables?
- Autofill advanced custom field with user data
- Confused about where to store my data
- Advanced search form with multiple custom fields
- How do I display specific custom posts, and how do I edit a post’s singular page?
- Populate custom post type/custom fields from an external database
- Fixed custom fields depending on posttype/category
- Can’t pick up a field created with Advanced Custom Fields
- How to enable the user to add value through the admin panel?
- Get month and day from a Date Picker custom field
- Setting a custom $query->query_vars[‘meta_key’] breaks the WordPress menu
- Displaying database table in backend of wordpress
- If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?
- How to show animal lineage/pedigree in WordPress?
- ACF – Query relationship without ID
- Retrieve a post with its ACF repeater fields in wordpress
- Is it possible to specify a time interval (from, to) in ACF with date picker, or other custom field?
- Display ACF object field data using Elementor Custom Query
- Post object GUID adding http:/
- Custom Sort Order for Custom Post Type Taxonomy
- Hide custom post type field from author?
- wordpress plugin error handling
- Trying to save custom post type from frontend partially working
- Comparing timestamps in meta query doesn’t work
- Is there any performance consideration when using Custom Post Types?
- Show image gallery from a custom field
- don’t publish custom post type post if a meta data field isn’t valid
- A meta box (in a custom post type) with two different type of fields
- Cannot obtain custom meta information
- SQL query – get ids – Advanced Custom Fields / WPeC
- What is the correct way that when creating a custom post type assign values to custom fields created with pods framework?
- Copying custom field value in to title
- Show Posts in Vertical Tabs with Scrollbar
- ACF Relationship: Group posts by parent category term, then child [closed]
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?
- selecting custom post types and taxonomies for hub page listing blocks
- Remote database access on another wordpress site’s custom post type