Content Templates

When outputting cars, WP Car Manager uses special templates to control the appearance of the listing and detail pages. For example, price.php contains the following:

<?php
if ( ! defined( 'ABSPATH' ) ) {
	exit;
} // Exit if accessed directly


global $vehicle;
?>
<div class="wpcm-price-wrapper" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
	<span class="wpcm-price"><?php echo $vehicle->get_formatted_price(); ?></span>

	<meta itemprop="price" content="<?php echo $vehicle->get_price(); ?>"/>
	<meta itemprop="priceCurrency" content="<?php echo wp_car_manager()->service( 'settings' )->get_option( 'currency' ); ?>"/>
</div>

This template part outputs the price on your car detail page:

The price template
The price template

WP Car Manager comes with a separate template file for almost every part of your car pages, allowing your full freedom in customizing your car listings.

You can override template files and add your own ones! Click here to learn how

Was this article helpful? ·