• Rbkhrlstn

    (@rbkhrlstn)


    Hi, my clients are using the pro version of your plugin. We are using several cpts and for one, “glossary” is all on one page. Is there anyway to create a second search that limits itself to that cpt and shows results using ajax? I know that ajax searches often have to be on the archive page and I can create an archive if needed.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Please elaborate. What exactly is the search experience you’re looking for here? Walk me through what the user does, what kind of response the site should give and what happens then.

    Depending on what exactly you’re thinking here, either it’s possible, not possible or possible in theory but against Relevanssi grain in practise. But what you ask now can apply to all of these cases, so I need more detail.

    (Also, if your client is using Premium, they’re paying for Premium support.)

    Thread Starter Rbkhrlstn

    (@rbkhrlstn)

    Hi Mikko,
    Thank you for getting back to me. Yes, I know they are paying for support but no one seems to know who the account is registered too. I can send you their api key?

    The experience, user ends on glossary page that is populated by the glossary post type. There is a search bar. The enter a term, part of a definition and hit enter. It searches only that page with the terms and returns results on that same page.

    The rest of the pages should still have sitewide normal relevanssi search.

    • This reply was modified 6 years ago by Rbkhrlstn.
    Plugin Author Mikko Saari

    (@msaari)

    Sure, I can find the user ID based on API key.

    That on-page search is something browser Ctrl-F search generally does better. There’s simply no point to involve Relevanssi in it: there’s nothing to search for, it’s just on-page information retrieval. You need some javascript to show the results, and you should just make that javascript find the content on the page.

    Relevanssi won’t help you with this, because all Relevanssi does in a case like this is to confirm that yes, the term appears on this page. Relevanssi won’t tell you where it appears, just that it appears – and that’s almost a zero result in this case.

    So get some javascript guy on this. Assuming the glossary is formatted in a reasonable way, it shouldn’t be tricky to read in the document tree, go through the nodes and see where the search term matches and then return those entries.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Limit search to single page’ is closed to new replies.