Documentation · Admin Reference
Shortcodes And Widgets Reference
This document is a reference for the Shortcodes & Widgets screen of the ADP Car Market Hub plugin (Car Market Hub → Shortcodes & Widgets). It documents every shortcode the plugin registers, the supported attributes and URL parameters, the editor and page-builder integrations and the dashboard widgets shipped with the plugin.
When to use this document
Read this if you are an editor, site builder or developer and you need to:
- Embed vehicle listings, search forms, comparison tables, favorites, location boxes or opening-hours boxes on a page.
- Pre-filter inventory at insertion time using shortcode attributes.
- Send pre-filtered traffic to the inventory page using URL parameters.
- Override a plugin template in your active theme.
- Understand which dashboard widgets the plugin provides.
Overview
The plugin registers six public shortcodes:
| Shortcode | Purpose |
|---|---|
[as24ci_archive] | Full vehicle inventory with filters, sorting and pagination. |
[as24ci_search_filter] | Standalone search form, intended for landing or homepages. |
[as24ci_compare] | Vehicle comparison table for visitor-selected vehicles. |
[as24ci_favorites] | Visitor favorites page (entries are stored client-side in localStorage). |
[as24ci_location_box] | Contact card for the dealer branch linked to a vehicle. |
[as24ci_hours_box] | Opening-hours card for the dealer branch linked to a vehicle. |
Each shortcode is also listed on the screen as its own entry with a dedicated Copy button and an expandable Attributes & examples section that shows the supported attributes and ready-to-use examples for that shortcode.
At the top of the screen, five KPI tiles summarise shortcode usage at a glance:
| KPI tile | Shows |
|---|---|
| Available Shortcodes | How many public shortcodes the plugin registers. |
| Shortcodes in Use | Total shortcode occurrences found across the scanned pages and posts. |
| Builder Integrations | How many supported editor / page-builder integration families are available. |
| Pages Using Plugin | Number of published pages and posts that contain at least one plugin shortcode. |
| Template Overrides | Number of plugin templates currently overridden by your active theme. |
Below the tiles, an intro card offers quick copy one-click buttons for the four most-used shortcodes — [as24ci_archive], [as24ci_search_filter], [as24ci_compare] and [as24ci_favorites] — so you can copy them to the clipboard without typing.
The screen also surfaces a Shortcode Usage Overview table that lists published pages and posts containing any plugin shortcode (up to the most recent 100 results), and a Developer Notes card documenting template overrides and supported URL parameters.
Requirements or prerequisites
- A user with a capability that can edit pages or posts.
- For
[as24ci_compare]and[as24ci_favorites], the corresponding feature toggle must be enabled inCar Market Hub → Settings. When a feature is disabled, the screen marks the shortcode with a Disabled badge. - For
[as24ci_location_box]and[as24ci_hours_box], at least one location must be configured in Locations and seller IDs must match the vehicle.
Step by step instructions
Embed a shortcode in a page
- Open the page or post in your editor.
- Insert the shortcode using the editor-native control: - Block Editor (Gutenberg): add a Shortcode block. - Elementor: add a Shortcode widget. - Divi, Beaver Builder, WPBakery: use the shortcode or text module. - Classic Editor: type the shortcode directly into the content.
- Paste the desired shortcode (with attributes if needed).
- Save and preview.
The plugin loads its own styles and scripts only on pages that contain a plugin shortcode, so unrelated pages are not affected.
Pre-filter the archive at insertion time
Use shortcode attributes on [as24ci_archive], for example:
[as24ci_archive make="BMW" price_max="40000" order_by="price" order="asc"]
[as24ci_archive fuel="electric" body="suv" per_page="12"]
Drive dynamic filtering from links or external forms
Append GET parameters to the archive URL (URL parameters override shortcode attributes):
/inventory/?make=BMW&max_price=20000
/inventory/?condition=new&sort=price_asc
Configuration reference
[as24ci_archive] attributes
All attributes are optional. URL parameters override shortcode attributes.
| Attribute | Description | Example |
|---|---|---|
make | Pre-filter by make. | make="BMW" |
model | Pre-filter by model (use together with make). | model="3 Series" |
price_min | Minimum price (numeric). | price_min="10000" |
price_max | Maximum price (numeric). | price_max="40000" |
fuel | Fuel type, for example petrol, diesel, electric. | fuel="electric" |
body | Body type, for example suv, sedan, coupe. | body="suv" |
order_by | Sort field: price, mileage, or date (default). | order_by="price" |
order | Sort direction: asc (default) or desc. | order="asc" |
per_page | Items per page: 12, 24 (default), 48, 72, all. | per_page="12" |
[as24ci_search_filter] attributes
| Attribute | Description | Example |
|---|---|---|
results_url | URL of the results page. Defaults to the plugin's vehicle archive URL. | results_url="/inventory/" |
[as24ci_compare]
No attributes. Place on a dedicated comparison page. The Settings screen can create this page automatically.
[as24ci_favorites]
No attributes. Place on a dedicated favorites or wishlist page. Favorites are stored in the visitor's browser via localStorage — no account is required and no data is sent to the server.
[as24ci_location_box] and [as24ci_hours_box] attributes
| Attribute | Description | Example |
|---|---|---|
post_id | ID of the vehicle post. Defaults to the current post in the loop. | post_id="123" |
The branch linked to the vehicle is resolved by AutoScout24 seller ID. If no match is found, the first (default) location from Locations is used.
Supported URL parameters
These parameters can be appended to the archive URL. URL parameters override shortcode attributes.
| Parameter | Description | Example |
|---|---|---|
make | Filter by make. | ?make=BMW |
model | Filter by model (requires make). | ?model=3+Series |
min_price / max_price | Filter by price range. | ?min_price=5000&max_price=20000 |
mileage_max | Maximum mileage. | ?mileage_max=80000 |
condition | all, new, or used. | ?condition=new |
sort | price_asc, price_desc, mileage_asc, mileage_desc. | ?sort=price_asc |
per_page | Items per page (12, 24, 48, 72, all). | ?per_page=12 |
q | Keyword search. | ?q=diesel |
Builder & Editor support
Native shortcode controls in Block Editor (Gutenberg), Elementor, Divi / Beaver Builder / WPBakery, and the Classic Editor. The KPI strip on the screen reports four supported integration families.
Dashboard widgets
The plugin adds the following widgets to the standard WordPress dashboard:
| Widget | Content |
|---|---|
| CMH – Company Overview | Vehicle counts, import timing, lead totals and portfolio value. |
| CMH – AI and SEO Monitor | AI text queue, image SEO queue and API connection status. |
| CMH – Current Leads | Recent inbound lead activity for your vehicles. |
| CMH – Car Performance | Most-viewed vehicles and engagement at a glance. |
| CMH – Price Information | Pricing intelligence snapshot for your inventory. |
Shortcode Usage Overview table
The Usage Overview table lists each published page or post that contains a plugin shortcode, with the following columns:
| Column | Shows |
|---|---|
| Content Title | Title of the page or post. |
| Content Type | Whether the entry is a page or a post. |
| Shortcodes Used | Which plugin shortcode(s) the content contains. |
| Count | How many plugin shortcode occurrences are in that content. |
| Last Updated | When the page or post was last modified. |
| Actions | An Edit link that opens the page or post in the editor. |
Template overrides
Shortcode output uses the same templates as the native vehicle CPT. To override a template, copy the file to the root of your active theme; WordPress will load your version automatically.
| Template | Used for |
|---|---|
archive-as24ci_car.php | Vehicle archive and shortcode listing output. |
single-as24ci_car.php | Individual vehicle detail page. |
page-as24ci_compare.php | Vehicle comparison page. |
Operational notes
- Shortcode Usage Overview scans up to the 100 most recently modified published pages and posts that contain any plugin shortcode. Custom post types are not included by default.
- The KPI tile Shortcodes in Use counts the total occurrences across the same scan.
- The KPI tile Template Overrides counts plugin templates currently overridden by your active theme.
- Disabling Compare or Favorites in Settings does not remove the shortcode from your content; it only marks it as disabled in this reference and may suppress its frontend output. Re-enable the feature to make the shortcode active again.
Troubleshooting
- A shortcode renders as plain text. WordPress did not run shortcode parsing on that field. Place the shortcode in main page or post content, in a Shortcode block, or in a builder module that supports shortcodes.
- The archive shows everything despite an attribute. A URL parameter overrides shortcode attributes. Remove the URL parameter or align it with the desired filter.
[as24ci_compare]or[as24ci_favorites]appears empty. Check that the corresponding feature is enabled in Settings. The screen also shows a Disabled badge in this case.- Location and hours fall back to the default branch. The vehicle's seller ID is not assigned to any location; add it in Locations.
- A theme override is not picked up. The file must be at the root of the active (or child) theme directory and must use the exact file name listed above.