Project

General

Profile

Actions

Feature #9912

closed

Collapsible search results and/or highlighting searched term?

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

Status:
Abandoned
Priority name:
Normal
Assignee:
-
Category name:
WordPress Themes
Target version:
Start date:
2018-06-11
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

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 6 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 http://perials.com/highlight-searched-terms-in-wordpress-search-results/. 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: https://dev.commons.gc.cuny.edu/hosting-partner-handbook#custom-themes-and-plugins

Actions #2

Updated by Boone Gorges over 6 years ago

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

Updated by Boone Gorges almost 6 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.

Actions

Also available in: Atom PDF