Can search work on text displayed on browser, rather than saved id in db?

Forums › Forums › Search & Filter Pro › Can search work on text displayed on browser, rather than saved id in db?

Tagged: 

Viewing 4 posts – 1 through 4 (of 4 total)
  • Anonymous
    #41992

    Hi,
    I’m running into an issue with the search box where my content is saved as an id, however, I need to be able to search by the id’s label and have it return results saved with the id that the label name is associated with.

    So for instance, if a post is written by an employee with employee_id of 5, the post is saved with the metadata: employee_id = 5. When viewing the post on a browser, I can display the employee’s full name by pulling it from a db table with author ids and names. However, is there any possible way to enter the employee’s full name within the search box, and have it return posts with that employee’s id associated with it?

    Please let me know when you can, any advice on this would be greatly appreciated! I wanted to save by id in case any names changed, but i’m worried there isn’t a way to get this working the way I’m expecting it to.

    Thanks again for all your help!

    Trevor
    #42027

    I read this one last night and didn’t understand, but I think I do now. Rather than have an author select box to use for searching, you want the visitor to be able to simply enter the author’s name in a text search field as though the author’s name is part of the post content?

    Anonymous
    #42055

    Hi,
    Thanks for the response. Well, we have a search input text box and we need to be able to search by employee name, however, the employee id is the only thing saved to the post (not the full name). So when I enter the employee’s full name in text search, it doesn’t come up in results.

    Is this possible?

    Or do you know if there’s an easy way to save hidden fields with the employee name/label? Might be an ACF hook.

    Trevor
    #42064

    Ah. You are using ACF? What type of field is it? Maybe a relationship field, or … ?

Viewing 4 posts – 1 through 4 (of 4 total)

Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.