0

I have a multsite Wordpress install and each site can have their own categories. I would like the site URL to be the new site name and then a cateogry and a post or page name.

For example, if I have a category of football, I'd like my URL to be something like: website.com/site-name/football

This would automatically display all the posts for the football category. If I click on the post the link would be something like: website.com/site-name/football/this-is-a-post

The same thing would be for pages as well. I had a page called gallery, I'd like my URL to be something like: website.com/site-name/football/gallery

I tried to update my permalink structure to be: /%category%/%postname%/

If I then go to: website.com/site-name/football

I get a 404 even though I know I have posts with this category. Any ideas how to have this work with the permalinks?

  • the permalink structure for a single post isn't related to the permalink of a category archive, that's a separate setting: category base. there are plugins for removing category base, but you'll still have issues with pages also sharing the same permalink structure as posts- how does WordPress know if gallery is supposed to be a post or a page? there's nothing unique in the URL that would identify what you're requesting. – Milo Nov 12 '14 at 19:20
  • @Milo Do you have any recommendations on how to achieve this result then? – user1048676 Nov 13 '14 at 15:15
  • 2
    My recommendation is to abandon this effort and just use the urls that WordPress generates. – Milo Nov 13 '14 at 15:38
2
+25

/football is not a valid permalink natively because taxonomy base /category/football is used to reliably distinguish permalinks between different objects (or you might get unholy collisions).

There are some answer on this site (as well as plugins around, for example FV Top Level Categories) for removing category base but it's considered highly error–prone configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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