Same Slug Name

Hello!

Can you use the same name for the slug in Categories, Posts and Pages? For example, a Category slug is called “test”, a Post slug is called “test” and a Page slug is called “test”.

TIA

Hello @adventurer,

Thanks for writing to us.

You can save the same slug for page/posts/category but it would not work. You can access the category page by URL like this example.com/category/test/. If you set the post and page same slug, then WordPress doesn’t serve the URL yourdomain.com/test/ as a post page of your post. Instead, WordPress will serve the page you created with that slug /test/. That means when you visit yourdomain.com/test/, you’ll see the page, instead of the posts page.

Thanks

Thanks!

After researching “slugs”, I have a better understanding of their purpose and the best practices for naming them. So, I’m going to keep Categories slug at "test’, Pages at “different-test” and the post slug will be an optimized version of the post title.

Thanks again!

Hello @adventurer,

Glad that we were able to help you. Please feel free to open a new thread if you have any more queries.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.