How to make the output of content depending on the conditions?

The problem is this. There is a small list of titles of partners, which are created using acf plugin. There is a list of cities and the need to make the choice, for example, Moscow has withdrawn the partners from Moscow and, of Novosibirsk, were withdrawn partners from Novosibirsk and all show all partners.

The task to implement it so that you can change one partner and it changed at once on the website and there was no need then to change them for each page separately.

Which way Google?
April 7th 20 at 15:25
2 answers
April 7th 20 at 15:27
Not sure how exactly you have made partners. But the problem is usually solved like this:
Creates a record type "PARTNERY" and taxonomy for it "Cities". By analogy as "Records" and "Categories".
Next, you create partners and add them to one or to multiple cities.

Now you have the opportunity by means of the EAP to all partners and cities.

Further, it remains only to withdraw the case. You can display server-side using WP_Query or receive and display on the client side using REST API
April 7th 20 at 15:29
towards ajax, and store data in a database

Find more questions by tags WordPress