How to change permalink in CPT

#774989
  • Resolved Kristyna Sovova
    Rank Math free

    Hello, could I ask for some advice? I am going to redesign a real estate agent website, in DIVI and WP. The focus will be on SEO. So I need to keep as many url’s as possible, redirect the rest. My point is that there will be posts on the new site (CPT or I’ll use “projects” in WP). But I need the custom posts to have the same url addresses as on the old site. So for example: domain.cz/stavebni-pozemek-olbramovice, but when I put them in projects on the new site, I get the url: domain.cz/projects/stavebni-pozemek-olbramovice, if I’m not mistaken and I don’t want those “projects” in the url. How to solve it please? I have the same thing here, for example, I created a custom post type using CPT and the slug (katalog-vozidel) https://www.avpro-auta.cz/katalog_vozidel/skoda-superb-2-0-tdi-140kw-4×4-laurin-klement/ is also in the url.
    Thank you very much for the advice.

    Kristyna

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello, I apologize for the issue you are facing with changing the permalink structure for custom post types on your website.

    To change the permalink structure for custom post types (CPT) in WordPress, you can follow these steps:

    1. Go to your WordPress dashboard.
    2. Navigate to SettingsPermalinks.
    3. Click on the radio button next to the Custom Structure option.
    4. You can then set a custom permalink structure for your CPTs without including the “/projects/” part in the URL.

    If you want to remove the “/projects/” part from the URL of your custom posts, you can set a custom permalink structure that excludes it.

    If you have created a custom post type using CPT and want to change the slug, you can edit the slug for each individual post by following these steps:

    1. Edit the post in the Classic Editor or Gutenberg.
    2. Look for the permalink section where you can change the end of the URL to remove or modify the slug.

    By customizing the permalink structure and editing the slugs for your custom posts, you can achieve the desired URL format without including unwanted elements like “/projects/”.

    If you encounter any difficulties or need further assistance, please feel free to reach out. Thank you for raising your concern, and we appreciate your focus on SEO for your real estate agent website redesign.

    Best regards.

    Sources:
    WordPress Permalink Structure & Changing Individual URLs » Rank Math
    How to Redirect Posts After Changing URLs » Rank Math
    What Is a Slug in WordPress? » Rank Math
    Analyzing Your Site’s SEO with Rank Math’s SEO Analysis Tool

    Thank you but I do not know where actually I can do this: “By customizing the permalink structure and editing the slugs for your custom posts, you can achieve the desired URL format without including unwanted elements like “/projects/”.” What should I do in order to exclude from my url the “/projects/”

    Thank you

    Hello,

    Thank you for contacting us and bringing your concern to our attention.

    You can change the permalink structure from WP Dashboard > Settings > Permalinks, and from there make sure to add only %postname%:

    However, you can also change the permalink for individual posts/pages from the Rank Math SEO Meta box.

    For more details, you can check this URL: https://rankmath.com/kb/wordpress-permalinks/

    Hope that helps and please don’t hesitate to let us know if you have any other questions.
     
    Thank you.

    Kristyna Sovova
    Rank Math free

    Hi, I have done this previously, but this does not help at all. This is why I ask for help. It still has /project/ in the permalink, please see: https://testovaci.webdyzajnerka.cz/project/projekt4-test-permalink/. Even when I set custom structure as you kindly showed me (and I did it before). I was wondering whether this could be done somehow through rank math plugin.

    Hope there is a way, I need this desperately.

    Many thanks for help.

    Kristyna

    Kristyna Sovova
    Rank Math free

    I think the issue is that this works only for posts, but I need to change the url structure for custom post types that are different from default posts in WP.

    Hello,

    Thank you for your patience.

    Yes, you are correct. Unfortunately, Rank Math currently doesn’t support stripping CPT slugs/URLs.

    In this case, you may have to use a permalink manager plugin like https://wordpress.org/plugins/permalink-manager/ to change the permalink structure of your CPT URLs.

    Looking forward to helping you.

    Kristyna Sovova
    Rank Math free

    Hi,

    that is great many thanks for your time and kind help. It works perfectly!!

    Best wishes

    Kristýna

    Hello,

    We are glad to hear that this issue has been resolved. Thank you for letting us know. This ticket will be closed now, but you can always open a new one if you have any other questions or concerns. We are here to help you with anything related to Rank Math.

    We appreciate your patience and cooperation throughout this process.

    Thank you for choosing Rank Math.

Viewing 8 replies - 1 through 8 (of 8 total)

The ticket ‘How to change permalink in CPT’ is closed to new replies.