Categories & Locations
Categories are how visitors browse your marketplace. Locations are how they filter by city/region. Best Classifieds uses standard WordPress categories for the free theme (with an optional listing_category taxonomy when Pro is active) — your data stays portable.
How the taxonomy is structured
The 8 default sub-categories created by the WOW Feeder are: Vehicles, Property, Electronics, Furniture, Fashion, Jobs, Pets, Services. Each has a Tabler icon assigned via the best_classifieds_category_icon() helper.
Adding your own categories
Via WordPress admin
- Posts → Categories (or Listings → Listing Categories if Pro CPT is enabled).
- Set the parent to Listings to make it a listing sub-category.
- Fill in name, slug, and description. The description shows on the category archive page.
Get an icon to render in the homepage grid
The category card shows an icon based on the slug. The mapping lives in inc/template-functions.php → best_classifieds_category_icon():
$slug_to_icon = array(
'vehicles' => 'ti-car',
'property' => 'ti-home',
'electronics' => 'ti-device-laptop',
// ... add yours here ...
'real-estate' => 'ti-building',
'rentals' => 'ti-key',
);
To override without editing the theme, drop this into a small custom plugin or a child theme’s functions.php:
add_filter( 'best_classifieds_category_icon', function( $icon, $slug ) {
$custom = array(
'real-estate' => 'ti-building',
'rentals' => 'ti-key',
'classes' => 'ti-school',
);
return isset( $custom[ $slug ] ) ? $custom[ $slug ] : $icon;
}, 10, 2 );
Browse all available icons at tabler-icons.io. Use the icon name with the ti- prefix.
How the homepage grid works
The Categories section on the homepage shows up to 8 sub-categories of “Listings”, ordered by post count (most-populated first). To control the order manually:
- Add a
term_orderto each category via SQL or the Advanced Custom Fields plugin. - Or filter the query:
add_filter( 'best_classifieds_homepage_categories_args', function( $args ) {
$args['orderby'] = 'name'; // or 'slug', 'count'
$args['order'] = 'ASC';
$args['number'] = 6; // show only 6
return $args;
} );
Locations
Locations are stored in the _bc_location post meta as a free-text field (“Brooklyn, NY”). The WOW Feeder also writes _bc_lat and _bc_lng for OSM map rendering on the listing detail page.
Why not a custom taxonomy?
We tried it. It adds complexity (term creation UX, choosing parent regions, normalizing input) that hurts most marketplaces more than it helps. A free-text field with city/state autocomplete is faster for sellers and simpler for buyers.
That said, if you’re a country/region-specific marketplace (e.g. India-only with state filtering), Pro adds an optional listing_location taxonomy:
- Classifieds Pro → Settings → Taxonomies.
- Toggle Enable location taxonomy.
- Add your locations under Listings → Locations.
- The submission form gets a location dropdown, the search dropdown gets location filters.
Auto-extracting city from _bc_location
The trust strip on the homepage shows “X cities served” by counting distinct _bc_location values. If your free-text values are inconsistent (“NYC” vs “New York” vs “Manhattan, NY”), the count will be inflated. The simple fix: nudge sellers toward a consistent format with a placeholder:
add_filter( 'best_classifieds_location_placeholder', function() {
return 'City, State (e.g. Brooklyn, NY)';
} );
Category archive pages
Category archive URL: /category/{slug}/ (or /listing-category/{slug}/ for the Pro CPT).
The archive uses archive.php with full-width grid layout (sidebar is suppressed for listing categories). To customize the archive header or filters, edit archive.php in a child theme.
Each archive shows:
- A clean breadcrumb: Home › Property
- A title: “Category: Property”
- The category description (if set)
- All listings in a 3-column grid (4 columns at 1680px+)
- Pagination at the bottom
Renaming the parent “Listings” category
If you want to call it “Ads”, “Posts”, or anything else:
- Posts → Categories → click “Listings”.
- Change the Name (the slug stays the same).
- The display label changes everywhere; the slug-based URLs and code references continue to work.
To also change the slug (e.g. listings → ads), update the slug too — but be aware that the WOW Feeder + Pro plugin reference the slug via the best_classifieds_get_listings_category_slug() filter:
add_filter( 'best_classifieds_listings_category_slug', function() {
return 'ads';
} );
After changing the slug, set up a 301 redirect from /category/listings/ to /category/ads/ to preserve any existing inbound links.