Hi, I'm creating a business directory.
I've created a post type called "Company" whit these custom fields:
- company type (checkboxes)
- company name and description (text fields)
- company website, telephone number, email address
- company address with region and city dropdown selection
I've created a view to search the company based on Type, Region and City (hidden link).
I'd like to create a single page for each City, where I can list all the companies that have their headquarter in that city.
For example for the city Padova, I'd like to list of the companies.
Hello. Thank you for contacting the Toolset support.
Well - I would like to know, City is configured as custom post type - correct? If yes, as I understand, you are looking to display the filtered results belongs to current city displayed using single city post. If yes:
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).
I have set the next reply to private which means only you and I have access to it.
Hi, at the end I created the city as post type and then I used post relationship.
In detail:
- I created a post type for the company (example: hidden link)
- I created a post type for the region (example: hidden link)
- I created a post type for the city (example: hidden link)
Then:
- I created a post relationship one to many (city and region)
- I created a post relationship one to many (company and region)
- I created a post relationship one to many (company and city)
+ Into the region page (example: hidden link) I have the possibility to list all the city (what I've done) and alle companies (maybe in the future).
+ Into the region page (example: hidden link) I can list all the companies filtered (with conditional output) for the type of company.
+ Finally I have the company page: hidden link