1. Home
  2. Car Demon Code Docs
  3. Actions
  4. cd_before_content_srp_action

cd_before_content_srp_action

This action is called before the content for the vehicle SRPs (Search Results Pages) and VDPs (Vehicle Display Pages).

do_action( ‘cd_before_content_srp_action’, $params );

Paramters

$params – These are any shortcode parameters that were used to display the SRP.

add_action( 'cd_before_content_srp_action', 'my_before_srp_action', 10, 1 );
function my_before_srp_action( $params ) {

    $html = 'Show this before the vehicle content.';

    echo $html;

}

The example above will output the phrase “Show this before the vehicle content” right before the SRP content is output.

Was this article helpful to you? Yes No

How can we help?