Skip Navigation

[Resolved] Not able to search custom post types with relevanssi

This thread is resolved. Here is a description of the problem and solution.

Problem: When I search for a custom field value, the expected results do not appear. I have rebuilt the index in Relevanssi and added the custom field to the list of indexed fields.

Solution: Check the Layout applied to the Search Archives. Make sure that the WordPress Archive cell applied here is set up to be used as a Search Results archive, which will display results from multiple post types.

This support ticket is created 6 years, 7 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by hannesU-2 6 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#577614
search - 2 - Kinomir.jpg
search - 1 - Kinomir.jpg

I am trying to: Display Search Results for my custom post types

Link to a page where the issue can be seen:Under construction. Will attach the login credentials.

I expected to see: Serach results including my custom post types

Instead, I got: Only blog posts as Serach results.

What i did, but what didn´t help so far:
- unchecked exclude_from_search in post type
- marked some post fields as searchable
- installed relevanssi
- activated the custom post type in relevanssi (tv-sender)
- added slugs of custom fields in relevanssi (wpcf-sendername, etc...)
- rebuild the index in relevanssi

It is very important that the tv station (custom poyt type) are displayed in the search.
One TV- Station is Kinomir for example.
To get there click on "Sender" in the menue >> "Bitte eine Sprache auswählen" >> scroll down to "russisch" >> "Bitte auswählen" >> "Kinomir"

Hope you can help once again 😉
Thank you so much in advance
hannes

#577684

Hi, I looked at your site and inspected the Layout applied to search results. It appears that the WordPress Archive cell that was placed in this Layout wasn't set up to display all post types, so this was the root of the problem. I have replaced that cell with a test cell for now, designed to be used as a search archive cell:
wp-admin/admin.php?page=view-archives-editor&view_id=1246

I copied the Loop Output from the original WP Archive cell and pasted it into the new cell. Now, I'm able to search by sender name:
yoursite.com/?s=Kin
yoursite.com/?s=france

Can you take a look and confirm the search results are now appearing as expected?

#577692

Thanks a lot, Christian! Works like a charm.
Come over and i will buy you a beer!

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