Adding number before each results
Last updated 4 years ago
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; }