How to change a custom post type taxonomy

Hello!

I've got a theme where I can put portfolio items, but when I enter to them the URL is .com/portfolio-item/the-item, and I wan't to change the "portfolio-item" part of the URL to something more SEO friendly, how can I do this?

This is a single site.

Thanks a lot for the help!

  • Patrick
    • Support Monkey

    Hi there @Jorge Castro

    I hope you had a great weekend!

    If the post-type is an integral part of the theme, then I believe you would have 2 options:

    - You can either edit the code directly in the theme to customize the taxonomy, which would mean you'd need to do that every time you update the theme...

    - Or you could create a new post-type with the name/taxonomy you want. Then use this plugin to convert the existing posts to your new post-type:
    https://wordpress.org/plugins/post-type-switcher/

    To create a new post-type, you could take our CustomPress plugin for a spin (it makes the job real easy):
    https://premium.wpmudev.org/project/custompress/

    I hope this helps! And thanks for being a member :slight_smile:

  • Jorge Castro
    • The Incredible Code Injector

    Hi @Patrick!

    Thanks for the help!

    I believe creating a new post type is the solution, I've installed both of the plugins but can you help me setting up the new post type? Because with all the options I'm a little bit lost.

    Thanks lot!

  • Ash
    • WordPress Hacker

    Hello @Jorge Castro

    I hope you are well today.

    You can go to Customporess > Content Types and add a new post type from there. Then when you edit the existing entries for portfolio-item then you will see a meta box to change post types, just change it to new created post type.

    But there will be a problem I think. If your theme provides any functionality for portfolio-item post types, like gallery or any animated grid system or something like that, that won't work. To keep the functionality, you must need to edit the core code, otherwise it won't work.

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

  • Ash
    • WordPress Hacker

    Hello @Jorge Castro

    Yes, the theme developer needs to edit the code. Otherwise ask him to provie a filter so that you can extend/change it from your theme's functions.php :slight_smile:

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.