(Locked) Avada search doesn't search Pages


#1

Hi All,

Bit worried about search form not finding any results on pages.

We are building a static client site that requires search and nothing comes up because we have all pages!

Any help? Tried heaps of search plugins but none work. Relevanssi is one we tried…


#2

Hey what do yo know? I worked it out!

Avada seems to have control over the default search, so you have to disable it.
I edited Theme Functions (functions.php)

At the very end of that file, just comment out the following (by adding // to start of each line):

function pyre_SearchFilter($query) {
if ($query->is_search) {
$query->set(‘post_type’, ‘post’);
}
return $query;
}
add_filter(‘pre_get_posts’,’pyre_SearchFilter’);

Pretty simple I know but did the job for me!


#3

Thanks TangentWeb, I’ve been trying to figure this out too. Why would one limit this without have it configurable via an option? Weird!

Now on to how to make the results look semi decent…


#4

Hey

I have purchased this and when i put in my codes it still doesnt let me in?


#5

This has LITERALLY saved my day! Why would anyone fix the search just by posts? Doesn’t make any sense…

Thanks again!


#6

Hi guys, for future reference, the appropriate support forum for this theme can be found here.



Or, you can interact directly with the author here. The link takes you to the item’s Comments section, where you can also browse previous posts for additional information and/or troubleshooting.



Just leave the author a quick comment and he’ll gladly point you in the right direction. Good luck.