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

cd_pre_specs_filter

This function is used to filter or add content to the area directly before the vehicle specifications 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_pre_specs_filter’, $html, $post_id );

add_filter( 'cd_pre_specs_filter', 'my_pre_specs', 10, 2 );
function my_pre_specs( $html, $post_id ) {

    $html .= '<tr><td colspan="2">My New Row!</td></tr>';    

    return $html;
}

The example above will add a table row spanning 2 columns and containing the phrase “My New Row!”

Was this article helpful to you? Yes No

How can we help?