Search not finding the details

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search not finding the details

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 6 years, 10 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10969
    klevur
    klevur
    Participant

    I purchased this tool today and have followed the instructions the best I can but the search will not find the details that I need it to. On this page – https://www.stalawyers.com/directory/ is a directory and I want to be able to seach for people, practice types etc. However, when I search for anything on this page it returns no results.

    I am not sure what I am doing wrong. Any help is appreciated.

    #10970
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I’ve looked at the Directory page, it appears to be built via a custom page builder of some sort. Some page builders use custom fields to store their data, including the post data as well. On the General Options -> Sources panel I have enabled the search in all custom fields option, now it will return the directory page properly if you search any of the content there.

    Returning the individual elements on that page is not possible however, because they are not separate objects (like post types or taxonomy terms). The items there should be post types or terms for the plugin to be able return them – because currently this is only stored as a single page in the database. In the database the content of that page is seen as one post meta for the directory page. I usually recommend creating and using a post type to separate and store information.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #10986
    klevur
    klevur
    Participant

    That is super helpful, thank you. It is appreciated. I managed to get things working correctly with the search to find on the things that I wanted on the specific page.

    https://autopilot.redlinesites.co/staff/

    I installed the plugin on this site temporarily to test it. The one thing I don’t understand is, if I click on the staff member’s image or name it redirects me to their profile page in the default list. If I click on the search result it takes me to the post page that just shows the image. Obviously, I would need for this to redirect me to the actual profile page after the search.

    • This reply was modified 6 years, 10 months ago by klevur klevur.
    • This reply was modified 6 years, 10 months ago by klevur klevur.
    #11009
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    From what I can see the difference is that the listing on that page have an additional query parameter at the end of their URL (namely this: ‘?team_cpt=IMT_PAGE_TEMPLATE’). I’m guessing it might be added automatically or by a filter. Anyways, there is a very simple solution to append this URL at the end of all the results with a small custom code snippet:

    Just simply put this into the functions.php file in your active theme (or child theme) directory. It will add the missing parameter to the results after post-processing.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #11019
    klevur
    klevur
    Participant

    Thanks for that. However, after adding it into the functions.php file I am getting an error that is at the top of the page and it did not correct the issue. You can see it at: https://www.stalawyers.com/

    #11027
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    You had it inserted after the php closing tag, so it was interpreted as HTML code. I’ve moved the code via the file editor, now it should be working.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.