Elegant Permalinks Using Multiple Custom Taxonomies
I am developing a listings website with custom post type 'listings', and custom taxonomies 'category', 'suburb' and 'city'.
A problem I have encountered is in creating elegant permalinks that query both the suburb and the category. For example, I would like the URL structure for the listings post type to be:
/listings/[category]/[suburb]
e.g.:
/listings/electricians/beverly-hills
In other words I need to be able to construct a permalink that can query two separate taxonomies (in this case category and suburb).
How could this be achieved? Furthermore, is there a way to generate a page that lists these constructed permalinks for a specific category (say electricians)?
Thank you.
I am developing a listings website with custom post type 'listings', and custom taxonomies 'category', 'suburb' and 'city'.
A problem I have encountered is in creating elegant permalinks that query both the suburb and the category. For example, I would like the URL structure for the listings post type to be:
/listings/[category]/[suburb]
e.g.:
/listings/electricians/beverly-hills
In other words I need to be able to construct a permalink that can query two separate taxonomies (in this case category and suburb).
How could this be achieved? Furthermore, is there a way to generate a page that lists these constructed permalinks for a specific category (say electricians)?
Thank you.
No comments:
Post a Comment