Custom Excerpts
-
I like the custom search result snippets, but wish I could retain the context provided by the default excerpts, particularly when the user has provided their own custom excerpt. Is there a way I can combine the two? Ideally I would want the following:
1. If the user has provided a custom excerpt, use it at the beginning of the excerpt.
2. If the the user has not provided a custom excerpt and Relevanssi’s search result snippet does not start at the beginning of the post, then include the default WordPress excerpt at the beginning of the excerpt.
3. In all cases end with Relevannsi’s search result snippet, so that we get the benefit of the highlighted search terms.
Given all the hooks Relevannsi has provided it seems like this should be possible, but I haven’t found the hook I need. (Or perhaps I need to do something clever with filter priority?)
- The topic ‘Custom Excerpts’ is closed to new replies.