Ajax Pro Search Issue

This topic contains 6 replies, has 2 voices, and was last updated by webkoncept webkoncept 4 years, 1 month ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #19033
    webkoncept
    webkoncept
    Participant

    Hi there Ajaxpro!

    We have an issue with the search tool, that we are struggling to fix.

    The problem is, that we have several pages with Tabs, and when we search among these we can find the results, but the search result does not include the Tabs ID, so you always end up on “january”, and the search results always shows the details for the first wine, on the first tab.

    Search page:
    http://d43048459.u131.surf-town.net/soegning/

    For an example:
    If we want to find the wine “2004 La Dorelle, Châteauneuf-du-Pape” located specifically in the tab:
    http://d43048459.u131.surf-town.net/arkiv/2006-2/#1529587925969-a6deca60-2e161e3d-0b67516a-68e9

    We end up on January ( http://d43048459.u131.surf-town.net/arkiv/2006-2/ ).
    This is the chase with all the tabs, the search system does not see the tabs at all.

    How can we instruct Ajax Search Pro so also read the Tabs?

    I look forward to hearing from you!

    Best regards
    Jonatan Nielsen
    Web-Koncept

    #19036
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Jonatan,

    Thank you very much for all the details, it helps us a lot.

    Unfortunately, this is not possible, at least not without major customizations or additional code. I will try to explain why:
    Tabs on that page are actually not individual posts, but a single post, and the tabs are actually part of the post content, I am guessing via a shortcode. When the plugin finds a post/custom post type match, it requests the result URL from WordPress code, by the matched object ID. In this case, the match is the post itself, so WordPress returns the URL to it.
    The tabbed structure is only a front-end feature to that post, the actualy post content in the database includes all of the tabs content, so it cannot be distinguished as separate tabs until it is visualized via the browser.
    If all of the tabs were separate post objects (like product variations in WooCommerce), then those would be possible to return separately.

    I usually suggest a quick workaround for customization requests, if it is possible, however in this case I can’t, as it is much more complicated to resolve. Most likely a combination of plugin modification (to pass the search query) and a custom made front-end javascript will be required to handle the tab switching.
    For customizations, I usually recommend this service: wpkraken.io
    They are a dedicated team of WordPress experts, and usually are able to help. If you want, you can ask them.

    Best,
    Ernest Marcinko

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


    #19040
    webkoncept
    webkoncept
    Participant

    Hi there Ernest!

    Thank you for your quick response 🙂

    I was thinking og perhaps re-packaging all the sections on the pages withing a certain Div class.

    Would it be possible for Ajax Search to define a div class as being “its own section” of some sort?

    I am prepared to change the structure of the pages, but i was truly hoping that we could create some sort of parameter for the plugin to use.

    Each tab does have a link, that works fine when used from an external source, so im thinking if we somehow can define some settings in Ajax to search them seperately.

    Do you think anything such as this would be possible, or perhaps another suggestion? 🙂

    – Jonatan

    #19042
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Jonatan,

    Changing the links within the search results is not the problem, that can be done easily. The problem is, how to get the link? Because there is no information about where the match has occured. It could occur in multiple places as well. The database only returns the matches (rows), but no other information – so there is no way of telling where the match is.

    Maybe, somehow, during the post process, it could be possible to check the whole search phrase against the post content, and locate it with strpos(..) function. Then somehow locate the closest preceeding tab. Then somehow get the tab ID to forge the URL. I guess that could work, but this is still not an easy task.

    Best,
    Ernest Marcinko

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


    #19043
    webkoncept
    webkoncept
    Participant

    Hi again Ernest!

    Yea it does sound like this solution does not come easy.

    Regarding catching this tab-URL post process, is this something you or some of your partners can assist with?
    Do you have an estimate of the project expenses?

    Alternatively, do you know if Ajax Search can jump to Anchor points on a search?

    – What i am trying to do here is simply to avoid having every single wine bottle on its own page.

    I would in this chase instead have a page for “january” and “february” and so on, with several bottles of wine.

    Best regards
    Jonatan

    #19050
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Unfortunately I am not available for custom jobs, I am only affiliated with the site I mentioned above. I don’t personally know them, but so far they seemed to be able to help. They will estimate a job cost. I honestly don’t know how much would this cost, I am not in the customization business for a long time now 🙂

    Basically adding the anchor point to the result URL would be the solution, the problem is getting that anchor point based on the search phrase.

    Best,
    Ernest Marcinko

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


    #19054
    webkoncept
    webkoncept
    Participant

    Hi there Ernest!

    Allright, i will see if i can find another solution to this.

    But it seems there is no way around (easily atleast), than splitting the content into seperate pages.

    Thanks for the information regarding this

    Best regards
    Jonatan

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

You must be logged in to reply to this topic.