You should register the post type from the old theme, all the posts are still there in the database WordPress just doesn’t know to look for them.
Use the register_post_type
with the same slug/post type name, and your old portfolio posts will reappear, no need to detach and re-attach to new pages
Related Posts:
- Creating a metabox to upload multiple images, Ignoring The Featured Image
- How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page
- Duplicate Custom Header Functionality into the post edit screen
- Media library – Limit images to custom post type
- Correct Post Count ( All | Published | Drafts | Pending | Trash ) for Custom Post Type when restricting to view own posts
- How to hide CPT files from media library programmatically
- Add metabox with media uploader in a custom post type [duplicate]
- How do I add media to a custom post type?
- How to make a page template to list all galleries?
- Too much recursion error when chosing image from image library for two different meta boxes in one post
- Using Default WordPress Custom Header Image Crop Feature in a Post Type / MetaBox
- Image size filtering in Media uploader according to custom post type
- Should I use custom post types for a front page video feature (vimeo)?
- How do I organize photos for multiple galleries?
- Delete all associated media when custom post type removed
- Remove fields on media uploader for custom page type – not working for “From Computer” or “From Url” tabs?
- Force documents to appear in Featured Image dialogue
- how to get URL of media uploaded to WordPress via media_handle_sideload()
- uploading images to specified directories
- WordPress 3.5 Media Uploader – Only allow 1 upload and certain file types
- Hide editor while keeping add media button in custom post type
- File sharing platform for user contributions? [closed]
- Cannot upload featured image to a custom post type
- Custom Attachment Type
- Insert into post button missing on custom post type
- Save data is post using php front end
- Attaching more than 1 parent (Post) to a media file
- Help Adding filter to Add Media button for custom post type
- Cant move file after media_handle_upload
- Custom post type media upload error with custom user role
- Custom post type Featured Image popup not working
- upload image with rest API to the media library
- Query by post title
- Marking future dated post as published
- WP insert post and custom taxonomy
- Assign a Custom Role to a Custom Post?
- Implementing “Video of the Day” Feature?
- echo value from ‘select’ field type into page template using cmb2?
- Undefined property: stdClass::$labels in general-template.php post_type_archive_title()
- Is it proper to create a page just to generate a listing page (eg. for a custom post type)
- How to quickly switch custom post type singular template?
- Post metadata deletes itself
- Genesis Child and Custom Post Type
- Best way to arrange custom post types by Attributes -> Order metabox value?
- Separate Custom Post Type Taxonomy by Comma
- CSS for Custom Post Types
- Display “Post 2 of 4” on single post page?
- Query post types with multiple keys
- How to generate a sitemap with custom posts (not Google XML)
- Turn query string to sub page
- Custom post type custom taxonomy archive page name
- Displaying the type of post (Custom) in a single.php
- If Statement – if current post is a child of a post with a taxonomy
- Unable to retrieve any posts of CPT in wp-admin
- Custom Page that comes with preloaded content for the user
- Rewrite slug for CPT
- Custom post type templating problem
- Register widget only page is a singular of custom post type
- Which post does a taxonomy term belongs to?
- Remove the parent slug in a CPT URL
- Custom Post Type – No Results Found
- Including metaboxes from custom post types in global search — continued
- Fixed values for same post translations
- Why does WP allow to view and media item as a page
- Custom posts type for individual pages?
- Custom Taxonomy not displaying all post
- How to Display Posts From Category Within a Custom Taxonomy?
- post-per-page and offset not working
- Published post auto change status to pending after 90 days
- How to retrieve all wordpress posts (specific type) inside a function in php?
- ACF for custom post type archive pages: which hook to use?
- Automatically update slug with latest title within custom post type [duplicate]
- Post Type Support Array Not Working
- Select Venue from dropdown list and reuse stored address information in meta_box
- Custom post type set default template using block editor
- build Custom post type and make it child for Posts and put it as comment
- Creating archive like functionality through birectional relationships
- Action on Custom Post publish
- Disable button after one click per user per post
- How to return/export only data showing on screen in custom post type view all screen
- Show Custom Post Type based on Category on Archive Page
- How can I add image sizes for a specific custom post type?
- Get all posts for custom taxonomy term
- $_POST from a Meta Box
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- How to store additional data that is related to core data
- How to get a custom post type archive paged when using a custom field for post sorting?
- Group based routing and administration
- Query events post type after current date and timezone
- This wp_query will not return any posts and only seems to work with post_status inherit?
- Using piklist meta box, strange behavior
- Multiple post types or single post type with category taxonomy?
- How to display the FAQ Archive page in my menu
- custom post type and taxonomy URL
- Creating a custom post type – want to add an alert for user
- Custom filtering on month value only of an entire date field
- Ordering by multiple meta keys – Custom post type
- Can I filter a post type based on comment moderation settings?
- Create option for custom posts types
- how to display custom taxonomies in front page