1. Home
  2. Car Demon Code Docs
  3. Display Filters
  4. cd_specs_filter

cd_specs_filter

This filter will allow you to modify the vehicle specification section on the VDPs (Vehicle Display Pages).

NOTE: The area being filtered is an HTML table. The filter has been positioned in between rows in this table. It is suggested that you utilize table HTML as shown in the example below.

apply_filters( ‘cd_specs_filter’, $html, $post_id );

add_filter( 'cd_specs_filter', 'my_spec_row', 10, 2 );
function my_spec_row( $html, $post_id ) {

    $html .= '<tr><td>Call us today!</td></tr>';

    return $html;
}

The example above will add a table row to the end of the specifications containing the phrase “Call us today!”

Was this article helpful to you? Yes No

How can we help?