Support Forums

The forums are closed and will be removed when we launch our new site.

Looking for support? You can access the support system via your account.

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)
  • Grosvenor
    #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 Moderator
    #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?

    Grosvenor
    #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 Moderator
    #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)

The topic ‘Can search work on text displayed on browser, rather than saved id in db?’ is closed to new replies.