Adding number before each results
What is this, and where do I put this custom code?
add_filter( 'asp_results', 'asp_number_results', 10, 1 ); function asp_number_results( $results ) { $num = 1; foreach ($results as $k=>&$r) { // Modify the post title $r->title = $num . ". " . $r->title; $num++; } return $results; }
Last updated 4 years ago