Using Best Classifieds

Listing Pages Explained

May 3, 2026 docsadmin 4 min read

Listing Pages Explained

A walkthrough of every component on the single listing page — what it shows, where the data comes from, and how to customize each piece.

The listing page is a two-column layout: gallery on the left, sticky info card on the right.


Anatomy of the page

Home › Vehicles › 2018 Honda Civic Sport — One Owner Featured image (4:3, large) A B Share Report — DESCRIPTION — C Listing Title (2 lines) $14,800 or best offer Condition Like New Location Brooklyn, NY Posted 3 days ago Listing ID #52 Show Contact Email Show Phone Number ftadmin Member since 2026 · 1 listing D
Letter Section Source
A Featured image Post’s featured image, sized to best-classifieds-listing-large (1200×800)
B Gallery thumbs [Pro] _bc_gallery post meta (array of attachment IDs)
C Description The post content
D Sidebar info card _bc_price, _bc_condition, _bc_location, post date, post ID, contact meta

The free theme shows only the featured image. Pro adds a multi-image gallery driven by the _bc_gallery post meta — an array of attachment IDs.

When the gallery has 2+ images:

  1. The first image becomes the large hero photo.
  2. Thumbnails appear in a row below.
  3. Clicking a thumbnail swaps the hero photo (no page reload).
  4. Click the hero photo to open a fullscreen lightbox with arrow-key nav.

The WOW Feeder writes 3 photos per listing by default (configurable 1–6).


Sticky on desktop (stays in view as you scroll the description), static on mobile.

Price

_bc_price post meta. Three accepted formats:

Stored value Renders as
14800 $14,800 (currency-symbol prefix, comma-formatted)
$14,800 $14,800 (verbatim — pre-formatted strings preserved)
$1,800/mo $1,800/mo (verbatim)
$60 / hr $60 / hr (verbatim)
Contact for price Contact for price (verbatim)

The detection uses is_numeric() plus a check for the currency symbol. If your stored value contains $ or any non-numeric character, it’s rendered as-is. Otherwise, the symbol gets prepended.

Condition

_bc_condition post meta. Free text. Common values: New, Like New, Used – Excellent, Used – Good, Used – Fair.

Location

_bc_location post meta. Free text. Used here AND on the listing card and breadcrumb.

Posted

The post date, formatted via human_time_diff() (e.g. “3 days ago”). To show the absolute date instead:

add_filter( 'best_classifieds_listing_posted_format', function() {
    return 'absolute'; // or 'relative' (default)
} );

Listing ID

The post ID, prefixed with #. Useful for users referencing a listing in support emails or messaging.


Contact reveal buttons

The two buttons under the info — “Show Contact Email” and “Show Phone Number” — use a two-click reveal pattern:

  1. First click: the encoded value is decoded and shown in the button itself, with a soft pop animation. The button switches to monospace font for clean alignment.
  2. Second click: opens mailto: (mail composer) or tel: (dialer / Skype / FaceTime).

The encoded format is base64 in a data-encoded attribute. This isn’t strong protection — sophisticated scrapers can defeat it — but it stops naive view-source regex sweeps. For real anti-scraping, gate the contact section behind login (Pro setting).


Seller card

Shows the post author’s gravatar + display name + member-since date + total listing count. Clicking it goes to the seller’s archive page (/author/{username}/) which shows all their listings.

To customize the seller card layout, override the partial in a child theme: template-parts/listing-seller.php.


OSM map [Pro]

If the listing has both _bc_lat and _bc_lng meta, Pro renders an embedded OpenStreetMap below the description. No API key needed (we use OSM tiles via Leaflet, which is GPL-friendly and free).

The marker is the listing’s location; the zoom level defaults to 14. To change defaults:

add_filter( 'best_classifieds_map_zoom', function() { return 12; } );
add_filter( 'best_classifieds_map_tile_url', function() {
    return 'https://your-tile-server.example.com/{z}/{x}/{y}.png';
} );

If you prefer Google Maps, contact us — there’s a paid Pro extension for that.


Similar listings [Pro]

Below the description, a “Similar listings” section shows up to 4 other listings from the same sub-category. Excludes the current listing.

To turn it off or change the count:

add_filter( 'best_classifieds_similar_listings_count', function() {
    return 6; // or 0 to disable
} );

Comments / Reviews

The free theme uses standard WordPress comments. Pro replaces this with 5-star reviews (writes one review per user per listing, with a moderation queue at Classifieds Pro → Reviews).

To force standard comments even with Pro active:

add_filter( 'best_classifieds_use_pro_reviews', '__return_false' );

Hooks for adding your own sections

The single listing template fires these action hooks where you can inject custom content from a child theme or plugin:

Hook Position Used by
best_classifieds_after_listing_image Below the gallery Pro: gallery thumbnails, action buttons
best_classifieds_after_listing_content Below the description Pro: OSM map, similar listings
best_classifieds_after_listing_sidebar Below the sidebar info card Pro: messaging widget, reviews summary
best_classifieds_listing_actions Inside the sidebar (replaces default actions) Pro: messaging button, save-to-favorites

Example — add a custom “Make an offer” button:

add_action( 'best_classifieds_listing_actions', function( $post_id ) {
    $price = get_post_meta( $post_id, '_bc_price', true );
    if ( $price && false !== strpos( strtolower( $price ), 'offer' ) ) {
        echo '<button class="bc-btn bc-btn-outline">Make an offer</button>';
    }
} );

See Customizing & Hooks for the full reference.

Leave a comment