admin管理员组

文章数量:1289565

I'm doing a project, which reminds a lot like every other real estate site. The site provides information from different buildings (we shall call them now on). On landing page we have a search form, which is planned to work like this:

Form is asking this data

  • Location | Data about location is in the cpt post (ACF)
  • List Type | Buy or Rent (Both are own category)
  • Building type | Beach house, Flat etc. (Categories under "Building type" category)
  • Size (Only in page /rent/. Data by ACF)
  • Prize (Only in page /rent/. Data by ACF)

What should happen after user does the query

IF the user clicked type=buy , we go url domain/buy/ IF the user clicked listtype=buy + Location , we go url domain/buy/location/ IF the user clicked type=buy + buildingtype=flat + Location , we go url domain/buy/location/buildingtype

  1. How do I approach this? I'm already going wrong by using only one custom type (building) or should I do multiple CPTs like buy + rent?
  2. Should I be using categories vs. tags?

本文标签: custom post typesSearching in multiple categoryURL hierarchy in real estate WordPress site