Reply To: Showing the search results on the search page (i.e. going without the Ajax)

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Showing the search results on the search page (i.e. going without the Ajax) Reply To: Showing the search results on the search page (i.e. going without the Ajax)

#2298

Gabriel David
Participant

So this code is a little weird, as something odd is going on with my search. It doesnt seem to actually be utilizing the search.php template, but that is something I personally need to fix but the code below needs some context:

<?php if(isset($_GET[“s”])):
require_once(ABSPATH . 'wp-content/plugins/ajax-search-pro/search.php');
$_POST[“aspp”] = $_GET[“s”];
$_POST[“action”] = “ajaxsearchpro_search”;
$_POST[“asid”] = 2;
$_POST[“options”] = “qtranslate_lang=0&set_intitle=None&set_incontent=None&set_inexcerpt=None&set_inposts=None&set_inpages=None&set_inbpgroups=None&set_inbpusers=None&customset%5B%5D=event&customset%5B%5D=speakers&customset%5B%5D=location&categoryset%5B%5D=2&categoryset%5B%5D=3&categoryset%5B%5D=4&categoryset%5B%5D=1&categoryset%5B%5D=5&categoryset%5B%5D=6&categoryset%5B%5D=7”;

echo “<h1>Search: “.$_POST[“aspp”];
echo ajaxsearchpro_search();
//$_posts = new wpdreams_searchContent($params);
//$pageposts = $_posts->search($s);
else: ?>
<?php get_template_part( 'content', 'page' ); ?>
<?php endif; ?>

Still need to format the returned JSON into html but
GG WP