Skip Navigation

[Resolved] Relevanssi – repeatable custom field

This support ticket is created 3 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 3 replies, has 2 voices.

Last updated by Waqar 3 years, 8 months ago.

Assisted by: Waqar.

Author
Posts
#1965705

Hi,

I'm trying to use Relevanssi to search through a custom field that is inside a repetable group. Is is posible?
I checked both the post types and pasted the custom field in the Relevanssi settings page, but it doesn't seem to be working. I'm starting to think it's because it's inside a repetable group.
Kind regards

#1966351

Hi,

Thank you for contacting us and I'd be happy to assist.

The custom fields inside the repeatable field groups can be indexed by Relevanssi, but, it is important that the view is set to show those repeatable field group posts, through the post-selection settings.

At the core, the repeatable field group posts are stored in a separate post type that has one-to-many post-relationship with the parent post type.

For this reason, if the view is set to show the results from only the parent post type (and not the child repeating field group posts), their results won't be included in the results either.

You'll find a good explanation about the same in this reply from Nigel:
https://toolset.com/forums/topic/repeatable-group-field-in-relevanssi-search/

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1966739

I'm not sure if I follow.

I'm not using any views, but the regular wordpress search form. My custom field a single line type of field, inside a repetable group, and in the relavanssi Indexing settings both post types are checked and custom fields are set to all.

Thanks for your help

#1970645

Thank you for waiting while I performed some tests on my website.

I was able to make the custom field from a repeatable field group indexed for search results, with the following steps:

1. I added custom post type "Books" which also had a repeating field group named "Book RFG". In this group, I added a single line type field "book-rfg-field".

2. From WP Admin -> Relevanssi -> Indexing, I selected "book" and "book-rfg" post types and also selected "some" for the custom fields option, so that individual custom fields can be included in the indexing. In the field for the custom fields, I added the field slug with prefix "wpcf-" so that is became "wpcf-book-rfg-field".
Screenshot: hidden link

3. The repeatable field group post types (in this case "book-rfg"), are set to be excluded from the search results, by default. To overcome this, I unchecked the option "Respect exclude_from_search" from WP Admin -> Relevanssi -> Searching.

After that, I recreated the search index from WP Admin -> Relevanssi -> Indexing, and then when I performed the search using the regular WordPress search, it included the results based on that custom field value.