Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Elementor Archive Posts Nothing Found Message Override › Reply To: Elementor Archive Posts Nothing Found Message Override
July 14, 2020 at 8:38 am
#28443
Keymaster
I think the problem here is, that checking $query->have_posts() returns false always, because the query did not execute yet. Basically the $query->have_posts() function is used to check if there are any matches, but after the query is finished. But then again, calling $query->set(..) has no effect.
I’m not sure if that hook allows you to check the query results, because it is triggered before the query is executed.