Skip Navigation

[Résolu] Creating page for each state

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
Creating page for each state

Solution:
How to display the related posts for state.

You can find the proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/creating-page-for-each-state/#post-1166821

Relevant Documentation:

This support ticket is created Il y a 5 années et 11 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par fedeD-3 Il y a 5 années et 11 mois.

Assisté par: Minesh.

Auteur
Publications
#1163168

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 (lien caché).

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.

Should I use a post relationships?

#1163594

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

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.

#1164578

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Well - I would like to know how you want to configure your city? As taxonomy or custom field or post type?

If you configure City as post type, then to connect it with other post types you need to create post relationship.

#1166821

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: lien caché)
- I created a post type for the region (example: lien caché)
- I created a post type for the city (example: lien caché)

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: lien caché) 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: lien caché) I can list all the companies filtered (with conditional output) for the type of company.
+ Finally I have the company page: lien caché