Support » Plugin: Custom Post Type UI » How to remove CPT slug?

  • Resolved axsu

    (@axsu)


    Hi!

    1st question. Is possible to remove the main or base CPT slug?
    www.example.com/books/single-book
    I would like to remove the *book* word from the url and even from the breadcrumbs.

    2nd question. I created some taxonomies that work as genres and I would like to have them in the url.
    www.example.com/poetry/single-book
    How can I achieve that? And it would be possible to show the taxonomy in the breadcrumbs?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    For the first part, I coincidentally just posted a blog post on this topic over at https://michaelbox.net/2020/06/slugless-post-type-permalinks/ so it’s worth giving a shot. It does require some coding, as there’s no UI for this detail.

    For the second part, are you referring to the taxonomy slug being in the url, but say single-book being the post type slug? Or is that the term slug in this case?

    Regarding customizing the breadcrumbs, that’ll be all on the proverbial plate of who’s set up the breadcrumb functionality, there’s no default setting or anything that we can toggle for that.

    Thread Starter axsu

    (@axsu)

    Hi @tw2113,

    Thank you for your answer.

    I followed your blog post and everything is working fine now. The slug books is not appearing now in the URL.

    The single-book it’s the post. I’ll rephrase the example:
    www.example.com/poetry/leaves-of-grass
    What I want to is showing poetry in the url. I hope it’s more clear now.

    Plugin Author Michael Beckwith

    (@tw2113)

    The BenchPresser

    I don’t have a handy link that helps mix taxonomy slugs and post type post slugs all in one URL, so I’m not much help there at the moment. I suspect it’s going to be an interesting challenge too, given my experiences with permalinks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove CPT slug?’ is closed to new replies.