0

By default, blog articles have an URL like example.com/article1.

Changing Settings > Permalinks with /%category%/%postname%/ makes it possible to have URL like:

example.com/foo/article2

Question: how to have blog articles of these 2 types:

example.com/article1
example.com/foo/article2

on the same website?

It is technically possible: multilingual websites often have this. How do they internally achieve this? (taxonomy?)

Maybe is there an easy solution to allow character / in the URL slug for articles?

4
  • If article1 has no category and article2 has the category foo, this should already work.
    – kero
    Oct 18, 2021 at 13:33
  • @kero With which settings in Settings > Permalinks? If I use /%category%/%postname%/ I get example.com/uncategorized/article1 instead of example.com/article1.
    – jontwo
    Oct 18, 2021 at 13:36
  • Ah, I forgot about the "uncategorized" thing .. sorry.
    – kero
    Oct 18, 2021 at 13:38
  • Use such plugin to achieve what you want: wordpress.org/plugins/permalink-manager Oct 18, 2021 at 13:56

1 Answer 1

0

Use a plugin like this to override the permalink structures on each post, post type or any other entry:

https://wordpress.org/plugins/permalink-manager/

2
  • Thank you. Is there a solution without a plugin? And maybe just custom code in the theme's functions.php?
    – jontwo
    Oct 18, 2021 at 14:29
  • Custom codes come with complexity and may require customization for your website. I recommend using this third party plugin as it's easy to use. Maybe you can add an htaccess rule to override the URLs and remove the "uncategoriez" from the post slugs and it would do the trick. Oct 19, 2021 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.