admin管理员组

文章数量:1124670

I have a custom port type 'apartments' and each apartment has several parametres which I made into custom taxonomies, like 'number of rooms', 'area', 'region', 'status', etc.

The task is to show all apartments in a table on the archive page. The table will contain all of these taxonomies in columns and apartments in rows. Each of these will have their own formatting. For example, each region will have its own color (yellow for 1, blue for 2, etc), or statuses will have other colors (green for free, red for taken), like on the image below.

There also will be filters on the page, but that's a task for later.

There can be a lot of apartments on that page, so I'd really like to know which way is the quickest way to make the php query (queries) which will execute quickly and allow me to style output or put custom css class depending on the value of the taxonomy.

本文标签: phpHot to show custom post type taxonomies on archive page