• Hi!

    I’ve searched and found some great stuff on the default WP search, but not exactly what I was looking for.

    I want to modify the default search to look at a specific table, a new table that I have created, in addition to the regular posts that it already searches. I don’t think a plugin will work for this because I’m not adding something that was already in the WP database like comments or pages.

    Can someone please tell me how the search works as in where is the code? I’ve read that it is only searching wp-posts, but I’m thinking if I knew where the code was, I could add another table or two to the search so that it searches more than just posts. Where is the search code?

    I am using WP 2.3.1 and I am adding a custom search page to my theme.

    Thanks!

Viewing 1 replies (of 1 total)
  • Your table doesn’t have to be original to WordPress for a plugin to work, it just needs to exist in the same database.

    See the source of my Search Custom plugin for one way you could go about adding a table (or perhaps even replacing the posts table with it) that’s not normally handled through the standard search query:

    https://guff.szub.net/source/search-custom.php

Viewing 1 replies (of 1 total)
  • The topic ‘How do you modify WP default search?’ is closed to new replies.