A city filter in a classifieds board script narrows the feed to the required region. Without it, a local marketplace becomes a dump from the whole country, and a user in one city sees lots from the other end of the map and leaves. For an Avito-like scenario, city is a must-have, not a secondary option.
Board start: manual, engine overview: board script.
Directory, not a free text field
Free input creates variants such as full name, lowercase, abbreviations, and misspellings; the filter breaks. You need a directory:
- region / province;
- city;
- optional district or metro for large cities;
- synonyms for admin search while adding.
For a regional board, start with one region and 10-30 settlements. Do not import the whole country "for growth"; authors get confused and SEO spreads over empty pages.
Where the user choice is stored
Usually the city is stored in cookie/session and shown in the header. Expected behavior:
- Select city: feed and categories are filtered.
- Reload page: choice persists.
- Open a direct category link with city in URL: filter matches the URL.
- "All cities" is a deliberate option, not the default for a local project.
If clean URLs look like /city/tver/nedvizhimost/, empty combinations should return a clear placeholder and noindex, not thousands of thin pages.
City field in the listing
City is required when posting. Autofill from the author's profile saves time but must be overridable; a person may sell a country house outside the city while living downtown. On the card, city is visible under the price or in parameters; in the list it appears in the preview metadata.
Changing city on an already approved listing can be a light edit or a new moderation pass. Decide in advance. For real estate, location changes are critical; for selling a sofa, less so.
Admin panel: avoid drowning in the directory
- Enable/disable cities without deleting them, so old cards do not break.
- Show active-listing counts by city to see where to recruit authors.
- Support mass replacement when cleaning the directory.
- Forbid posting in disabled cities.
A moderator should see city in the queue without opening the card. Some spam is obvious from a mismatch such as Jobs plus a resort city in another timezone on a local board.
Typical bugs I catch on acceptance
- The filter exists in UI but SQL ignores city_id.
- The VIP block on the home page ignores the selected city.
- Text search is global while category is local, confusing the user.
- After login, the city resets to the profile default.
- The mobile city menu cuts long names and cannot be selected.
Test: two cities, two listings each, switch in header, check home, category, search, and VIP. If VIP from another city appears in the showcase, I do not sign acceptance. VIP: here.
Connection with an Avito-like site
The habit of selecting city comes from large classified sites. Users expect the same on your site: Avito-like script. A turnkey marketplace should ship with a directory already filled for the client's region: marketplace.
City filtering is a small entity with a large trust impact. Directory, stable session, honest clean URLs, and VIP in the same city. Do it before advertising, and local traffic stops dropping on the first click.
Multi-city and the whole region
When the marketplace grows to a region, users ask to see nearby cities. Make it explicit: "only my city", "+50 km", or "region", not a silent mix of other-city lots. Otherwise people think the filter is broken. For VIP, keep a strict rule: a city showcase slot belongs only to its city_id. Regional VIP is a separate tariff and block if needed.
- Do not mix city_id values in one SQL result without a UI label.
- Always show city text in the card, even when the filter is selected.
- Put only content-filled city feeds in sitemap.
Directory import and typos
I do not import every city in the country at launch just for show. We import the region from a reliable directory, remove duplicates, and check grammatical forms in templates if the script supports them. Duplicate or misspelled cities are caught by listing counts and author complaints. Merging cities requires a backup: card city_id values change, and old clean URLs need redirect or 410 depending on the case.
In the posting admin, the moderator should quickly change city if the author made a mistake. Without it, the queue fills with trivial corrections. Browser geolocation is fine as a hint, not as the only way to choose a city; VPN users and wrong detections will be angry. Always leave manual selection.
Ads and city landing pages
For paid traffic, /city/... pages with a live feed are convenient. Do not send paid traffic to a city with three listings; bounce will be expensive. First content, then campaigns. In analytics, watch not only visits but also listing submissions and contact clicks by city. That shows where the filter supports the business and where the directory is dead weight.
If there are only two or three cities, subdomains or an explicit entrance choice can be simpler than pretending to cover the whole country. A city filter in a board script is basic classified hygiene. Keep the directory narrow, session stable, VIP city-specific, and clean URLs honest, and local users stop leaving because the feed shows other regions.
Connection with the author's account
In the author account, filter listings by city too if the author manages several points. During posting, suggest the last selected city but allow changes. Admin statistics for listings by city help decide where to recruit authors offline. City filtering is not only header UX; it is a management axis for a local marketplace.
If a city is paused, do not delete it from the directory. Mark it inactive, hide cards from public pages, and show a clear placeholder on the clean URL. Hard deletion breaks old Telegram and ad links. Careful deactivation preserves history and nerves, keeping the directory a living tool rather than a dump of dead ids.
FAQ
Classifieds city filter script?
City filtering is a core scenario for a classifieds site similar to Avito.
How long does “Classifieds Filter by City” take?
About 6 minutes to read. In practice it depends on your hosting and database setup.
Do I need a dedicated server?
For most scripts, shared hosting or a VDS with PHP and MySQL is enough. See the VDS section and PHP/MySQL requirements.
Php classifieds board script?
See the related manual for this query. php classifieds board script
Buy a turnkey classifieds script?
See the related manual for this query. buy a turnkey classifieds script