Is there any way I can get the search results to a variable in search.php file? Now I have the following code in my search.php file.
<?php if (have_posts()) : ?>
<h3 class="pagetitle"><?php _e( 'Search Results', 'buddypress' ) ?></h3>
<?php while (have_posts()) : the_post(); ?>
......
I know the while loop uses some variable that contains the search results. Now I want to use this variable before the loop. I need this variable to do some processing before displaying the results.