Change
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
to
<?php if ($allsearch->have_posts()) : ?>
<?php while ($allsearch->have_posts()) : $allsearch->the_post(); ?>
because otherwise you don’t utilize your custom query.
See WP_Query Usage.
Also call wp_reset_query();
after the Loop.
See wp_reset_query Description.
Actually, you don’t need wp_reset_query();
because you use custom WP_Query
object and don’t need to reset global
$wp_query
.