Support » Plugin: Relevanssi - A Better Search » Can the plugin be used on totally custom-designed filters?

  • Resolved stratboy


    Hi, I’m a developer and usually I build wordpress themes from scratch ad hoc for my own clients, often starting from some designer’s project. I usually don’t like pre-built third-party commercial themes. I’m looking for the right search plugin.

    This time I have to build a custom page where my designer wants a custom ajax search with 4 text fields that should be used together as a filter. The text fields are meant to be filled with custom metaboxes values. So I should code some javascript that sums up the fields values and pass them to your plugin in some way, then start the search and get the results data (I hope json) to use to build the results DOM.

    In other words, I will build a totally custom frontend and thus I would need some kind of API to use/hook-into with your plugin.

    I never used your plugin. Is it possible to do that? Does your plugin maybe have some kind of API or public functions list I can use to integrate its functionalities on my page?

    Thank you, regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari


    Yes. Relevanssi gives you plenty of control.

    See filter hooks here and functions here.

    What you’re looking for is relevanssi_do_query(), which can be used to run a Relevanssi query anywhere. Just pass the function a WP_Query object, and you’ll get results back. If you want to use custom field parameters, you need to manipulate them into a meta_query object and pass that to Relevanssi.

    Fantastic, thank you very much!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can the plugin be used on totally custom-designed filters?’ is closed to new replies.