relevannsi, separators in snippets
-
I have relevannsi set up to show content from ACF fields, using the “custom_fields_to_excerpts” function as described at https://www.relevanssi.com/knowledge-base/add-custom-fields-search-excerpts/.
It works very well, but quite often several separate bits of content (from different acf fields) will be returned in the same result snippet, and it is hard to see where one bit ends and the next begins.
In the default code from the function you have
$content .= " " . $custom_field;
so the separator is just an empty space.
I changed it to
$content .= " | " . $custom_field;
…which is better but still hard to see. I tried to wrap that in a span (so i could style it with css) but it seems relevannsi strips out the span tags.
Is there any way I can make sure the span tags are not stripped out, or another way to make the separators easier to see?
- The topic ‘relevannsi, separators in snippets’ is closed to new replies.