Hi
So far, we have not found a solution on how to combine MPG with the native WordPress search, but we have a separate function that implement search by generated pages.
You can read about that here: https://docs.mpgwp.com/article/34-how-to-search-by-generated-pages
Thank you, Oleksandr. Appreciate the link and help.
Hi again π I checked out the link, but I am not sure how this works. Does that code go in the functions.php file? How do I add a search field to my pages? Thank you so much for your help. Thank you.
Hi, sbernado
If you would like to create ajax (live) searchyou can put this code in the functions.php of your theme (but, probably, the file will be overriden after theme update), or you can create child theme, and put the code to the functions.php in a child theme (to avoid overriding after theme update)
But you need to wrap the code into function, and create route for ajax-calls
If you need to render results in a search page, put the code in search.php file in a active theme folder.
The main idea – is return an array with data on search query. Then, you can iterate the array and render results in a page with search results or in any block on a pages (in case it’s ajax implementation)
p.s: To do all this tricks, you need to know php.
p.s2: This approach is too difficult for most users, so, probably, we’ll rewrite this functionality to more easy way.
Keep track the updates.
Thank you for your reply, Oleksandr!
At least now I know this isn’t possible by default π
Thanks again. – scott
I have also been hoping for a search feature where you can use taxanomies such that the search form can have filters e.g. by state, city etc. For example, have a column on the excel file data where you assign these unique values that will go on to the custom fields of the auto generated pages – or something like that.
However, So far I use Google custom search, it’s able to pick up the MPG pages on the site.
-
This reply was modified 5 years, 1 month ago by
mavicks.
“However, So far I use Google custom search, itβs able to pick up the MPG pages on the site.”
Thanks for the tip!