• Resolved skar666

    (@skar666)


    Hello,

    I can’t get it to work with Divi. I have installed both: relevanssi and relevanssi-live-ajax-search plugins and I am using a Divi search control. I am able to get some search results, but there a no suggestions if I type something in the search field. What I am doing wrong?

    Greetings

    Skar

    • This topic was modified 2 years, 9 months ago by skar666.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Mikko Saari

    (@msaari)

    I tested with the Divi default search form, and what actually happens is that the Live Ajax Search works and generates results, they’re just not visible.

    Add this snippet to fix the problem:

    add_filter( 'relevanssi_live_search_add_result_div', '__return_false' );

    Thread Starter skar666

    (@skar666)

    Thank you for your fast response. I’ve testet it and it works but just for the search form what I add via a shortcode. With the default search form from divi it doesen’t work for me… here just only appear a drop down box with a list of the previous search terms I’ve used.

    Plugin Author Mikko Saari

    (@msaari)

    Relevanssi Live Ajax Search cannot be used with the Divi Search module search form. There’s no way for the plugin to modify that form to add the necessary parameters there. I’ve asked Divi support to add a filter hook to that search form; if that happens, then it’ll be easy to fix. Until they do that, it’s impossible.

    Thread Starter skar666

    (@skar666)

    Ok, great. Let me know, if you got an answer. Meanwhile I’ll use an shortcode and style it with CSS. What should I do, if I want highlight the search terms in my found documents? I know there is an option for this, but it only works when I do a search and open a document from the search results page, but it doesn’t work when a suggestion list builds up while I type the search term and open a document directly from that suggestion list.

    • This reply was modified 2 years, 9 months ago by skar666.
    Plugin Author Mikko Saari

    (@msaari)

    Hmm, this should just work without any modifications necessary. If the Relevanssi “highlight search terms in documents” setting is enabled, it should add the highlight parameter to the permalinks, both in regular search results and the live search results.

    If you look at the live search results, the highlight parameter does not appear in the links? Have you customized the template, or are you using the default template in the live search?

    Thread Starter skar666

    (@skar666)

    I am using a standard Divi text module without any modifications and that short code: [searchform post_types=”post,page,news”]
    The highlight parameter definitely not appear in the live search results link urls. It appears just only in the regular search links.

    Plugin Author Mikko Saari

    (@msaari)

    And no changes to the Relevanssi Live Ajax Search templates? Weird. With the default settings, the highlighting should just work and if it doesn’t work, it shouldn’t work in the regular search results either, as the mechanism is the same in both cases.

    What you can try is to create a custom search results template for Relevanssi Live Ajax Search (instructions here). Copy the default template and change get_permalink() to relevanssi_get_permalink(). That should fix this problem; if it doesn’t, then the problem is likely caused by some third-party interference.

    Thread Starter skar666

    (@skar666)

    I follow your instructions and it works for me now. Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘It Doesn’t work with Divi’ is closed to new replies.