I want to modify search results. Currently I hook to the_posts and check wp_query->is_search to determine if I am looking at the search results page.
However, I noticed that the_posts is executed not only on the search results, but also on any excerpt list on the page (such as a listing of news items in the footer of the page.)
How can I tell which the_posts call is which? Should I assume it’s the ‘first’ one? or is there a better way?