Forums › Forums › Search & Filter Pro › Multiple results templates ajax
- This topic has 4 replies, 2 voices, and was last updated 8 years, 2 months ago by Anonymous.
-
Anonymous(Private) September 7, 2016 at 12:45 pm #56798
Hi there,
I need to have multiples results templates so I have modified “results.php” to :
global $post;
if($post->post_parent == 252 && !is_page(723)){
include(‘results-directories.php’);
}else if(is_page(array(723))) {
include(‘results-directory-jobs.php’);
}else if(is_page(array(613,617,623,627))){
include(‘results-news-blog.php’);
}else if($post->post_parent == 577){
include(‘results-events.php’);
}It works all fine when I don’t use Ajax although when I enable Ajax the script does not work anymore.
I have came to a conclusion that without reloading the page the if statement in “results.php” is not executed and so no result is shown.
Is there a way to use different results templates and at the same time use Ajax?
Thanks in advance.
Marco
-
AuthorPosts