Skip Navigation

[Resolved] relevanssi prevents from ordering by custom field

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 4 replies, has 3 voices.

Last updated by Ido Angel 1 year, 7 months ago.

Assisted by: Waqar.


I have relevanssi installed for being able to search within custom fields, and I need that for certain post types. But in some post types I would like to order results by a custom date field, and I can't when I'm using relevanssi. Is there a function to allow only chosen views to ignore ordering by relevance?




Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi there

In the Relevanssi settings you specify what to include in the index.

If you update the index settings to exclude the post types in question (and rebuild the index), does that not mean Relevanssi is ignored when it comes to ordering?

(I haven't tested that, but it is what I would expect.)


Hey Nigel,
Basically you're right, but I need to be able to search in custom fields as well with these post types, so I have to index them in relevanssi... question is can they be index and still ordered by the custom field and not relevance.



Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Ido,

If you'll go to WP Admin -> Settings -> Relevanssi and switch to the "Searching" tab, you'll see some options to fine-tune its behavior for the search results.

There is also a "Default order" setting, but it only offers "Relevance" or "Post date", options.

When the Relevanssi is active it takes control over the WordPress queries, as a whole. So it would be a good idea to get in touch with their support team, to know if they offer any function/hook, to exclude certain pages or queries so that certain views can be ordered by the view's settings.



Thanks Waqar

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.