• Hi there hoping someone can shed some light…

    Basically I’m developing a plugin which allows you to filter your posts according to various taxonomies, Category being one of them.

    Now the obvious way to to filter your posts by multiple categories would be to use a string like:

    http://www.yoursite.com/?category_name=category1+category2+category3

    This works fine and as expected. However after playing around with the URL I also realised this works:

    http://www.yoursite.com/category/category1+category2+category3/

    Does anyone know of any drawbacks using this second method or if there are any reasons it may or may not be encouraged? Personally I prefer the second way of writing it however there is very little documentation, and most other plugins out there that play with multiple categories write the URL in the way of the first method above!

    I am obviously doing a check to see whether permalinks are enabled and only using the second method when they are.

    Any thoughts welcome 🙂

The topic ‘URL structure when using multiple categories?’ is closed to new replies.