Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
No highlighting in search results?
<txp:if_search>
<txp:article pgonly="1" limit="10" />
<txp:if_search_results>
<h1 class="section-header">Search Results for "<txp:search_term />"</h1>
<txp:article limit="12" form="search_results" searchsticky="1" />
<txp:else />
<h1 class="section-header">No Results Found for "<txp:search_term />"</h1>
<h2>Please try again, or browse our website using the menu above.</h2>
</txp:if_search_results>
</txp:if_search>
I’m not getting <strong> tags wrapped around search terms anymore. Any ideas why?
I checked the FAQ entry but didn’t see anything relevant.
Last edited by maruchan (2011-03-17 16:15:08)
Offline
Re: No highlighting in search results?
<txp:search_result_excerpt /> is the tag that sets the <strong> highlight. (Default). It’s in the search_results form. Has something changed there?
Offline
Re: No highlighting in search results?
Ah, thanks very much. For some reason I read that as “this will show the article’s excerpt with terms highlighted,” so I had it wrapped in if_excerpt with an “else” clause that just showed txp:body. And of course, no articles (yet) with actual excerpts in them. :D
Offline
Re: No highlighting in search results?
I wonder why it won’t return certain words in an article? I have an article that says “trade and sales materials” and search results are only returning hits for “sales,” not “trade.”
Last edited by maruchan (2011-03-17 19:00:25)
Offline
Pages: 1