Remove permalink slugs from custom post types?

Is there a way to get rid of a custom post type slug in ACPT? For example, I have a CPT named “cars” which contains a bunch of different cars. When I try to visit each car, the page comes out as https://www.domain.com/cars/car-name. I’d like to have it as https://www.domain.com/car-name, but when I change custom rewrite to “/”, and the link changes to “https://www.domain.com/car-name”, it loads up the 404 page. I know there’s a plugin that can remove them, but I’d like to do it through ACPT itself without using plugins or functions file.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer