Feature #9912


Collapsible search results and/or highlighting searched term?

Added by Michael Shields over 5 years ago. Updated almost 5 years ago.

Priority name:
Category name:
WordPress Themes
Target version:
Start date:
Due date:
% Done:


Estimated time:
Deployment actions:


When a word is found after using the search feature, every page appears with that word. However, as the entire page appears, the user needs to scroll through the search results to find the appropriate page. If many long pages appear, the user needs to spend a lot of time looking for the correct page.

Is there a way to collapse each returned page or only show the part of the page with the matched term? Also, is it possible for the matched term to be highlighted or bolded?

Thank you!

Actions #1

Updated by Boone Gorges over 5 years ago

  • Status changed from New to Reporter Feedback

Result collapsing and search-term highlighting would both be theme-specific features.

"Smart" collapsing is likely to be tricky to implement, since (for example) a search result might contain the search term at both the beginning and the end of the post. This makes it hard to know how to auto-excerpt.

Search-term highlighting is a bit more straightforward. There are some fairly simple PHP-based techniques to be found on Google, eg This could also be fairly easily accomplished using JavaScript. Either of these techniques would require a child theme, which would need to be developed by your project. Here's some info on partnering with the Commons on custom functionality and child themes:

Actions #2

Updated by Boone Gorges over 5 years ago

  • Category name set to WordPress Themes
  • Target version set to Not tracked
Actions #3

Updated by Boone Gorges almost 5 years ago

  • Status changed from Reporter Feedback to Abandoned

Hi Michael - I'm closing this ticket due to lack of activity. Please feel free to reopen if you have more questions or concerns.


Also available in: Atom PDF