Custom fields in excerpts
-
Hi,
We use Relevanssi at our company for quite a few sites, it’s a great plugin thank you.
One issue that came up is that if we have a post type that has no post_content and only custom fields, relevanssi will index the custom fields but using the_excerpt() in the search loop will produce no output for these post types
We’ve worked around that issue for the moment by checking the relevanssi_excerpt_content filter to see if it’s blank and adding the first custom field if it is, but of course this could be confusing to users if we show an excerpt that doesn’t contain their search term. So is there an option in relevanssi (or the premium version) that we’ve overlooked to show the custom field that matched the search terms rather than just post_content in the_excerpt()?
Tom Adams
dxw
The topic ‘Custom fields in excerpts’ is closed to new replies.