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

cd_sort_filter

This filter will allow you to modify the vehicle sort that appears on the vehicle search results page.

apply_filters( ‘cd_sort_filter’, $sort );

add_filter( 'cd_sort_filter', 'my_sort', 10, 1 );
function my_sort( $sort ) {

    $sort = '<div class="my_class">' . $sort . '</div>';

    return $sort;
}

The above example will wrap the sort with a <div> tag that has a class of “my_class”.

Was this article helpful to you? Yes No

How can we help?