• Resolved kemperofthegyre

    (@kemperofthegyre)


    I am looking to be able to create a custom search function on my page.

    The search should have three variables for the user:

    1) Search for Title
    2) Search the Body Text of a Page
    3) Search Among a collection of names and companies and be able to list which pages these appear on.

    I would like to find a search option that would allow me to do that.

    The one that is causing me the greatest headache is 3. The names will be posted on a particular section of each page. Is there some way to be able to get a search option to be able to search only within that field. In using pure html, I was able to do so by creating <div class=” “> tags around the section. Does a similar thing exist in WordPress?

    The other option that occurs to me would be creating some kind of identifier tag within each individual file similar to META name=”keywords” option and get the search engine to scan for those.

    Any suggestions welcome and greatly appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • For #3 – So more of a filtering of returned results from a previous search/query? FacetsWP, a paid plugin, can do something like that.

    #3 also sounds like a perfect reason to use tags – just tag the post/page with the names/companies.

    For 1 and 2 – default WordPress search already does this – so unless you mean you want to have options that users select to *only* search by title, or *only* search by content, this functionality is already part of WordPress.

    Thread Starter kemperofthegyre

    (@kemperofthegyre)

    I will check out Facets WP, thank you.

    With the suggestion to use tags, is this a problem when what could be required may involve 30-40 different names on a single page? I’d rather it be able to be dealt with by a search rather than tags if possible. Is there any way to get the search function to limit itself to the block of text on the page in which these names appear?

    As as to search only by title and content, yes, that is what I want it to do.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Searches’ is closed to new replies.