Documentatie · Frontend-handleiding

Voertuigdetailpagina's

Dit document behandelt de voertuigdetailpagina van de ADP Car Market Hub WordPress Plugin: de inhoudsstructuur, galerij, specificaties, prijsweergave, contactacties en het templategedrag.

Wanneer u dit document moet gebruiken

Lees dit document als u wilt begrijpen wat er op een afzonderlijke voertuigpagina wordt weergegeven, hoe de paginalay-out is geconfigureerd, hoe bezoekers omgaan met het contactformulier of hoe het template kan worden aangepast door een theme-ontwikkelaar.

Overzicht

Elk gepubliceerd voertuig heeft zijn eigen detailpagina. De pagina presenteert het voertuig aan de bezoeker in een gestructureerde lay-out met een galerij, de belangrijkste specificaties, technische gegevens, uitrustingslijst, prijsstelling, een contactformulier en optionele functies zoals een financieringscalculator, download van PDF datasheet, delen op social media en proefritaanvragen.

De voertuigdetailpagina wordt gerenderd door het ingebouwde template van de plugin (single-as24ci_car-classic.php). De lay-out is verdeeld in drie configureerbare zones die worden beheerd via de Layout Manager:

  • Hoofdinhoud (linker kolom): galerij, beschrijving, specificaties, energiegegevens, uitrusting en optionele extra blokken.
  • Zijbalk (rechter kolom): prijsbox, belangrijkste feiten en financieringscalculator.
  • Onderste gedeelte: contactformulier, dealerinformatie en vergelijkbare voertuigen.

Het actieve thema kan het template overschrijven door een single-as24ci_car.php-bestand in de themamap te plaatsen. De plugin controleert op deze overschrijving voordat hij zijn eigen template laadt.

Vereisten of randvoorwaarden

  • De plugin moet geïnstalleerd en geactiveerd zijn.
  • Er moet ten minste één voertuig zijn geïmporteerd en gepubliceerd.
  • Pretty permalinks moeten zijn ingeschakeld in WordPress (Instellingen → Permalinks) om de standaard URL-structuur voor een afzonderlijk voertuig te laten werken. Zonder pretty permalinks zijn afzonderlijke voertuigpagina's mogelijk niet bereikbaar via de verwachte URL-structuur.

Stapsgewijze instructies

  1. Klik in het voertuigarchief op een willekeurige voertuigkaart. De link verwijst naar de detailpagina van dat voertuig.
  2. Ga alternatief naar de WordPress-beheeromgeving, open Voertuigen en klik op Bekijken onder de titel van een voertuig om de detailpagina aan de frontend te openen.

De lay-out voor een afzonderlijk voertuig configureren

  1. Open in het beheergedeelte van de plugin de Layout Manager.
  2. Selecteer de zone Single Vehicle – Main Content, Single Vehicle – Sidebar of Single Vehicle – Bottom.
  3. Sleep blokken om hun volgorde te wijzigen of schakel hun zichtbaarheid in/uit.
  4. Sla de configuratie op.

Wijzigingen worden onmiddellijk toegepast op alle voertuigdetailpagina's zonder dat er opnieuw geïmporteerd hoeft te worden.


Configuration reference

Layout zones and available blocks

The following blocks are available in each zone. The default configuration is shown below each zone; the Layout Manager allows changing the order or disabling individual blocks.

Single Vehicle – Main Content (default order):

  1. gallery – Image gallery
  2. description – Vehicle description text
  3. specs – Technical specifications table
  4. energy – Energy and emissions data
  5. equipment – Standard and optional equipment lists
  6. warranty – Warranty information

Single Vehicle – Sidebar (default order):

  1. price_box – Price display with list price and savings badge
  2. key_facts – Key facts grid (make, model, mileage, year, fuel type, etc.)
  3. financing_calc – Financing calculator (if enabled)

Single Vehicle – Bottom (default order):

  1. contact_form – Inquiry contact form with seller information
  2. dealer_info – Dealer information card (standalone)
  3. similar_vehicles – Related vehicles from the same make and model

Additional blocks from these lists can be placed in other zones if the Layout Manager allows, except for the financing calculator which renders in at most one zone (sidebar takes priority over main, main takes priority over bottom).

The gallery displays all images attached to the vehicle. Images are assembled from two sources: imported images (_as24ci_image_ids) and manually uploaded images (_as24ci_manual_image_ids). Manually uploaded images appear first.

Gallery display options:

SettingOptionsDescription
Gallery layoutslider, masonry, thumbnailsVisual layout of the gallery
Aspect ratio16:9 (and other ratios)Aspect ratio applied to the main gallery image
LightboxEnabled / DisabledWhether clicking an image opens a lightbox
Lazy loadingEnabled / DisabledWhether images are lazy-loaded

If no images are available, the gallery section does not render a fallback placeholder for the main image.

Price display

The price box in the sidebar shows:

  • Selling price: the imported or manually set vehicle price, formatted with the configured currency.
  • List price (if available and higher than the selling price): shown as a strikethrough, with the savings difference calculated automatically.
  • Currency: uses the vehicle's own currency field, or falls back to the default currency configured in the plugin settings.

Key facts sidebar

The key facts block shows a grid of important specifications. The visible fields and their order are controlled by the Field Registry → Key Facts block configuration. The following fields are supported:

FieldDescription
MakeVehicle make
ModelVehicle model
Body typeBody style
Fuel typeFuel type
Drive typeDrive configuration
TransmissionGearbox type
ConditionNew or used
First registrationRegistration year
MileageOdometer reading in km
Power (HP)Engine power in HP
Power (kW)Engine power in kW
Exterior colorBody color
DoorsNumber of doors
SeatsNumber of seats
CO₂ emissionsCO₂ in g/km
Listing IDInternal listing number

Fields that have no value for the current vehicle are automatically hidden.

Technical specifications

The specs block in the main content area shows a detailed list of technical fields. The fields rendered depend on the vehicle data and what has been imported. Units are applied automatically:

  • Mileage: km
  • Engine power: HP / kW
  • Engine displacement: cc
  • CO₂ emissions: g/km
  • Fuel consumption: l/100 km (urban, extra-urban, combined) or kg/100 km for CNG
  • Electric power consumption: kWh/100 km
  • Battery capacity: kWh
  • Range: km
  • Weight: kg
  • Dimensions (height, width, length, wheelbase): mm
  • Boot volume: l
  • Charging power: kW
  • Charging time: min

Values are read from the plugin's custom vehicles database table when available, with fallback to post meta for vehicles imported before the current table structure.

Equipment

The equipment block renders two lists:

  • Standard equipment: features included as standard.
  • Optional equipment: features available as options.

Both lists are imported from the vehicle data source and stored in the custom vehicles table. Equipment lists are only shown when they contain at least one item.

The vehicle detail page includes a breadcrumb trail: Home → Cars → Make → Model. The Make and Model links pre-filter the archive by that make or model. The "Cars" link points to the configured archive page.

Social sharing

If the social sharing feature is enabled, share buttons are rendered on the detail page. The supported networks are WhatsApp, Facebook, Instagram, X (formerly Twitter), Email and Copy link (the visible set is configurable). The placement is configurable — Below gallery, Sticky right sidebar or End of page:

  • Below gallery and End of page render a horizontal row of buttons (under the gallery, or at the bottom of the page below the contact section) and are visible on all screen sizes.
  • Sticky right sidebar is a fixed bar on the right edge of the screen that also carries the Favorites, Compare and PDF datasheet quick buttons (when those features are enabled). It is hidden on phone-sized screens (≤ 600 px), so on phones use Below gallery or End of page to keep sharing visible.

Placement and visible networks are configured under Design & Styles → Social sharing buttons; see Beheerdersreferentie voor Design & Styles.

Contact form

The contact form allows visitors to send an inquiry about the vehicle. The form is submitted via a standard HTML POST request.

Contact form fields:

FieldRequiredConfigurable
NameYesNo
EmailYesNo
PhoneNoYes (can be disabled)
MessageYesYes (can be disabled)
Privacy consent checkboxYesYes (can be disabled)

The privacy consent checkbox displays a configurable consent text. If a privacy policy URL is configured in the plugin settings, the text "privacy policy" within the consent text is automatically converted to a link.

Success and error messages after form submission are configurable in the plugin settings.

Test drive request

If the test drive feature is enabled, the contact form includes an optional "Interested in a test drive?" checkbox. When checked, date and time fields appear and allow the visitor to request a specific test drive slot. Verify test drive configuration in your plugin settings before publishing this feature.

Seller / dealer information

The contact form section includes a seller panel showing:

  • Seller name
  • Job title
  • Address
  • Email address (as a clickable mailto: link)
  • Phone number (as a clickable tel: link)
  • Profile photo
  • Social profile links (Facebook, Instagram, X, LinkedIn)

The contact shown in this panel is resolved by CMH Team contact routing. The plugin first looks for a CMH Team contact for the vehicle — a per-vehicle assignment, the default contact for the vehicle's branch, or the global default contact — and falls back to the general dealership contact when configured. A team member set to "no visible contact" hides the panel, and an inactive member is never shown. Only when CMH Team does not apply does the panel fall back to the legacy seller profile (WordPress user meta determined by the _as24ci_seller_user_id post meta field, or the post author). See CMH Team and Contact Routing.

Favorites and compare buttons

When the social sharing Sticky right sidebar placement is selected, the fixed bar on the right edge of the detail page also includes:

  • Favorites button (heart icon): adds or removes the vehicle from the visitor's saved favorites. Shown when the favorites feature is enabled.
  • Compare button: adds or removes the vehicle from the compare selection. Shown when the compare feature is enabled.
  • PDF datasheet button: shown when the PDF datasheet feature is enabled.

This right-edge bar is hidden on phone-sized screens (≤ 600 px). With the other share placements (Below gallery / End of page), these quick buttons are not grouped into a side bar. Independently of placement, the compare feature shows its own floating compare bar once the visitor has selected vehicles to compare.

Similar vehicles

The similar_vehicles block shows up to four other published vehicles with the same make and model. Each card shows the thumbnail, title, price, fuel type, transmission, year, and mileage. A "Show all vehicles" link returns the visitor to the full archive.

PDF datasheet

If the PDF datasheet feature is enabled, a download button is available on the detail page. Verify this feature is enabled and configured in your plugin settings before publishing.

Operational notes

  • The single vehicle template is loaded via the WordPress single_template filter. The plugin checks for a theme override (single-as24ci_car.php in the active theme) before loading its own template. If both exist, the theme file takes priority.
  • Vehicle data is read from the plugin's custom {prefix}as24_vehicles database table when available. For vehicles imported before this table existed, data falls back to WordPress post meta fields.
  • The gallery combines manually uploaded images and imported images, with manually uploaded images always appearing first.
  • The financing calculator renders in at most one zone. If it is placed in both the sidebar and the main content, only the sidebar instance renders.
  • The as24ci_after_contact_form action hook fires after the contact form section, allowing integrations to inject additional content.

Troubleshooting

The vehicle detail page shows a 404 error.

  • Verify that pretty permalinks are enabled (Settings → Permalinks in WordPress admin). After changing permalink settings, save them once to flush rewrite rules.
  • Confirm the vehicle is published and not in draft or private status.

The gallery is not showing images.

  • Check that images were imported correctly. In the admin, open the vehicle edit page and verify the gallery images are attached.
  • If images were uploaded manually, confirm they are saved under the manual image IDs field.

No price is displayed.

  • The price box only shows a price if the vehicle has a price value greater than zero. Check the imported vehicle data.

The contact form is not sending messages.

  • Verify that your WordPress site can send email. Many hosting environments require an SMTP plugin or additional mail configuration.
  • Check the plugin leads configuration for any required fields or restrictions.

The financing calculator is not appearing.

  • Confirm the financing feature is enabled in the plugin settings (it is disabled by default).
  • Confirm it is active in the Layout Manager zone for the single vehicle page.

Key facts are showing zero or empty values.

  • Some fields depend on the custom vehicles table. If a vehicle was imported before the table was created, re-importing the vehicle may resolve missing values.

Gerelateerde documenten