Car Demon Code Docs

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


This filter will allow you to change the output of the vehicle sidebar widget.

The following example will wrap the widget output in a div with the CSS class of “my_wrap”:

function my_cd_vehicle_widget_filter( $html, $post_id ) {
    $html = '<div class="my_wrap">' . $html . '</div>';

    return $html;
add_filter( 'cd_vehicle_widget_filter', 'my_cd_vehicle_widget_filter', 10, 2 );
Was this article helpful to you? Yes No

How can we help?