• Hello,

    I really like how the search engine works on this site. It is also possible to achieve this with the help of a free plugin.

    I don’t need the exact same thing, I just need the ability to put a search engine on any page that searches subpages without redrawing the whole page.

    Please help

    Thank you

    • This topic was modified 9 months, 3 weeks ago by James Huff. Reason: link moved to proper field

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    There are a number of Ajax search plugins. It’s less likely any provide for a subpage only search but perhaps the search could be modified. The usual WP search uses the WP_Query class. You could likely use the “pre_get_posts” action hook to modify the search to only search subpages. The Ajax request would need to include the current page’s ID. If you set this ID as the “post_parent” query var, you should get the results you desire.

    Getting the Ajax request to include the page ID would require modifying the related plugin JS/jQuery code. Since JS is easier to override than PHP, this should be feasible to do.

Viewing 1 replies (of 1 total)
  • The topic ‘Ajax search engine only in subpages’ is closed to new replies.