Search box to find FAQs
-
Hello, I am trying to do a FAQs page. I already have a list of FAQs, but I want it to have a search box. I have this:
<div class=”widget widget_search”> <div class=”search-form”><label>
<span class=”screen-reader-text”>Search for:</span>
<input type=”search” class=”search-field” placeholder=”Search …” value=””>
</label></div></div>
However, this only works as “ctrl+F”: the only questions that pop up are those that have exactly the same word/sentence that you typed. For example, if my question is “Where are you from?” and I type “where from” my current code does not show anything, but if I type “you from” it will show the question.
Do you know how I can make it display all questions that have the words I type (not as a sentence)? Using the previous example, how can I make the “Where are you from?” question pop up if I type “where from”?
-
Hi there, I don’t have that. It sounds like it’d take some more sophisticated logic than HTML could handle, too.
Could you send a link to page you’re working on?
Please note these forums are for the sites hosted and managed here at WordPress.com. For help with a site hosted somewhere else, you’ll need to use the forums for self-managed WordPress installations instead.
If you are on your own installation, while we can’t help here, Jetpack does have an advanced search feature. It’s not a ctrl+f thing and it’s not designed for a single page, but it might work for you.
- The topic ‘Search box to find FAQs’ is closed to new replies.