This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: results page override functionality on other pages

Home Forums Product Support Forums Ajax Search Pro for WordPress Support results page override functionality on other pages Reply To: results page override functionality on other pages

#38862
Ernest MarcinkoErnest Marcinko
Keymaster

No, your code is incorrect. The first argument of the function will always be a boolean value returned by the plugin – the result of the search query check. When the function in the code returns true the override applies, when false, it does not. All you did was rename the $is_search variable to $is_front_page, it will make no difference whatsoever.
You can check the wordpress hooks documentation to understand how they work. Within this hook you will probably have to use the $wp_query argument, to check what query is executed, to determine the outcome of the function.