Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need the search for highly customized. I've a custom post type with custom field. Search result should be displayed in this way:

  1. First search should be performed into all title and displayed them
  2. Then into a custom field and shown then (except those which were shown in step 1)

So, I planned about using fully custom MySQL query. I'll search inside title first and store post ids into an array. Then run another query into post meta table and show result except those posts which were shown in first step based on the array of post id.

Don't know if it's a good idea. Can you please give me an idea to perform my task in an effective way?

Thanks

share|improve this question

1 Answer 1

Use Relevanssi ( https://wordpress.org/plugins/relevanssi/ ). If you have a large database then swiftype is better option.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.