• I’ve installed and activated Relevanssi Live Ajax Search and added the recommended PHP snippet to my child theme found in the compatibility section of the Relevanssi site but my search still isn’t producing any live results. Am I doing something wrong?

    Code Used Below:

    add_filter( 'relevanssi_live_search_hijack_get_search_form', '__return_false' );
    add_filter( 'get_search_form', function( $html ) {
    global $form_number;

    $config = apply_filters( 'relevanssi_live_search_get_search_form_config', 'default' );
    if ( ! $form_number ) {
    $form_number = 10;
    }
    $form_id = 'rlvlive_' . $form_number++;
    $parentel = 'data-rlvparentel="#' . $form_id . '"';
    $html = str_replace( 'name="s"', 'name="s" data-rlvlive="true" ' . $parentel . ' data-rlvconfig="' . esc_attr( $config ) . '"', $html );
    $html = str_replace( '</form>', '</form><div id="' . $form_id . '"></div>', $html );

    return $html;
    } );

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

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

    (@msaari)

    Looks like that menu search form doesn’t use the get_search_form filter hook to create the search form, so that function does nothing. You can ask the Divi support if there’s a filter hook that can be used to modify the HTML code of the search form. If there is, then this is easy to fix, but if there’s no such filter hook, then installing Live Ajax Search to that search form is very difficult.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.