Search code examples
phpwordpresswordpress-themingcustom-post-typeelementor

Change Custom post type slug


I recently developed a site that showed job postings,

I created a custom post type with the slug 'job_post', which the client then added numerous posts too,

I now need to change the slug to '/jobs',

Is there a way of doing this without deleting all the posts? I am worried I will mess the site up,

Many thanks,


Solution

  • You do not have to delete any post. When you change the slug; the posts will automatically removed. All you have to do is to export all job_post using wordpress export and then change your post type name. Then edit the xml file and change the post type there too. Import that xml file and all your posts will be there in the new post type "jobs"