• Resolved SomniumLucidus

    (@somniumlucidus)


    Hi Mikko,

    I’ve set Relevanssi to allow some html tags in my custom search result snippets, such as <em>, <strong> and <p>.

    So far so good—except that the search results snippets pick up and show the <hr /> tags inserted in the text of some posts. How can I get Relevanssi to not show them?

    TIA!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Mikko Saari

    (@msaari)

    I couldn’t get Relevanssi to show the <hr /> tags I added to my posts, no matter how hard I tried. Can you please show me what the post in question looks like in the database (you can see that from the Relevanssi settings debugging tab)?

    Thread Starter SomniumLucidus

    (@somniumlucidus)

    Well, this is weird.

    https://drive.google.com/file/d/1R4dHCtF0MGvLgBt4J3HlPDaUMSxo0X-K/view?usp=sharing

    Anyway. The text on this post comes from a custom field. Which is perfectly searchable, but comes up in searches with a <hr /> tag that is typed into it…

    Thread Starter SomniumLucidus

    (@somniumlucidus)

    Just found something.

    In Settings -> Excerpts and Highlights ->Custom excerpts/snippets…

    …if I check the box “Create custom field specific excerpts”, then the <hr /> tags appear in the search results. If I don’t, they don’t show (also the search result snippets look more elegant because the <p> tags are allowed to separate the text into paragraphs).

    So this is solved on my part, at least practically. The tag issue can be investigated further but it’s no longer a bother here.

    (BTW, I love Relevanssi and I’ve recommended it to others. Just so you know. Thanks! =)

    Plugin Author Mikko Saari

    (@msaari)

    Thanks, that was useful and I can now reproduce and fix the problem.

    Thread Starter SomniumLucidus

    (@somniumlucidus)

    Fine, then–I’m marking this as solved.

    Have a great day!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘tags show in search results’ is closed to new replies.