Changing custom type name hides the posts

I think what you’re saying is that you’re changing the name of the posttype (CPT) itself not the posts within that post type.

If that IS the case then WordPress is performing exactly as it should. That plugin is creating a CPT “custompost1” and then you are adding posts (1,2,3,etc) with that post type.

Then you instructed the plugin to no longer show the post type “custompost1” when you changed it to “student-portal”. That plugin isn’t also changing all the actual posts you created. It’s simply telling WordPress that the old post type is no longer valid (as it’s no longer referencing it) but the new one what should be used.

You can do this in a couple ways, but the easiest for you would be to tell the plugin to create both CPTs (temporarily). Then get another plugin that changes posts from one type to another. There are many of these plugins (search post type switcher in the repository).

Now open the original posts “custompost1” list, select all of them in the admin section and simply change them to “student-portal” CPT.

After that is complete you should see all the posts now under the “student-portal” CPT list.

All that’s left is to delete the post type switcher plugin and then remove the CPT “custompost1” from the plugin you used to create it.

UPDATE

To edit all posts you can click the check box above all of the posts in the column header (pic attached).

Then choose Bulk edit right above that(just above the red circle in my photo), then click apply. just below that an options panel will open. You can choose the post type there and then click apply.enter image description here

If you have more than 20 posts, go to screen options in the top right and you’ll see an option to show more than 20 posts per page. Do this before you change them all and you can do it in one shot.