• Resolved sbernado

    (@sbernado)


    Hello ??

    Is there a way for the pages generated by the plugin to be searched by WP’s default search? My goal is for users to search by zip code or city name and deliver the respective page within WP’s search results. Thank you kindly for your time and for this plugin.

Viewing 7 replies - 1 through 7 (of 7 total)
  • 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

    Thread Starter sbernado

    (@sbernado)

    Thank you, Oleksandr. Appreciate the link and help.

    Thread Starter sbernado

    (@sbernado)

    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.

    Thread Starter sbernado

    (@sbernado)

    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 3 years, 4 months ago by mavicks.
    Thread Starter sbernado

    (@sbernado)

    “However, So far I use Google custom search, it’s able to pick up the MPG pages on the site.”

    Thanks for the tip!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Enable Site Search for pages created by MPG’ is closed to new replies.