How to change URL structure for custom post list?
-
This is actually pretty straightforward, but I hardly know how to best express what I’m trying to do.
I’m building a site for a company that owns planned communities; they want listings of their homes for sale. To that end, I created a custom post type of “Listings.” Categories like “Alphatown” and “Betatown” serve to segregate the listings within custom loops of a single category each. Those loops are put on a page with a custom wp_query, so the URL for the listings pages would be something like this:
company.com/alphatown/homes/
The problem is that as soon as you click on one of the individual listings, the URL becomes something like this:
company.com/listings/listing-1
whereas it would be preferable if it were this:
company.com/alphatown/homes/listing-1
Is there any way in WordPress to accomplish this? Or will I have to make “Alphatown” and “Betatown” totally separate WordPress installs in order to make the URLs conform to this structure?
- The topic ‘How to change URL structure for custom post list?’ is closed to new replies.