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

cd_vdp_content_filter

This filter can be used to modify the vehicle “content” or “description” field before it’s output to the vehicle display page.

apply_filters( ‘cd_vdp_content_filter’, $content, $post_id );

add_filter( 'cd_vdp_content_filter', 'my_content', 10, 2 );
function my_content( $content, $post_id ) {

    $content = '<div>Call us at 1-555-555-1212</div>' . $content;

    return $content;
}

The above example will add a <div> tag to the beginning of the vehicle content / description with “Call us at 1-555-555-1212′ inside of it.

Was this article helpful to you? Yes No

How can we help?