Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1029970

    Hi Guys,

    the shop search function is not working correctly. I attach the last closed thread but the problem is still consistent in the new site (access details in the Private Content box).

    1. SHOP PRODUCT SEARCH: If I use the product search widget in the shop alone, the search is picking up text not in the product… but with investigation the word is in link names.
    2. SEARCH RESULTS PAGE – Could you tell me how I put a class on the H2 title which it is picking up from the global h2 size and too big?

    PREVIOUS THREAD (NOW CLOSED) – https://kriesi.at/support/topic/search-error-2/

    #1031067

    Hey Peter,

    Thank you for creating a new thread.

    I can now login to the site but I need another authentication to access the actual page. Please add it in the private field. Or just set the user role to admin.

    This site is password protected while under development. Enter your password to access the development site.

    Best regards,
    Ismael

    #1040070
    This reply has been marked as private.
    #1040248
    This reply has been marked as private.
    #1041047

    Hi,

    I think I found the issue but I couldn’t test it because the Appearance > Editor panel is disabled. Please edit the js > avia.js file, look for the AviaAjaxSearch function and edit this code around line 1328:

    minChars: 3, 
    

    Try to set the value from 3 to 6. Actually, the default value should work just fine but it’s being hindered by another ajax script. Do you know where this is coming from?

    
    ttps://events-writer.smartlook.com/rec/events?rid=jpw-KEmkygW&sid=bc5mOUzBvmK6&pid=5824f01a673eec64628b456a&vid=L8k8wiy1oKP&group=10d&source=website
    

    Best regards,
    Ismael

    #1041207

    Hi Ismael,
    I did the edit to “6” – But it didn’t work :-(
    The Smartlook was just something I tried for a trial period – I took that script off again. Tested again with “3” and “6” in line 1328 but it didn’t work (yet) I am sure you are on the right track :-)!!!
    Feel free to do whatever it takes

    Netz

    #1041212

    Hi Ismael,
    Hmmm you got me thinking…
    I disabled all the plugin that I guessed using AJAX
    Then the search page was NOT EMTY anymore :-)))) But the “Pre find (Ajax) dropdown from the search field” don’t work (the one with pictures inside
    But this is a huge step forward!!! I rather have search results on the search page than “NADA FOUND” :-)
    Strange thing — I tested with 3 and 6 in the edit above
    Both work as described (no dropdown pre-find)
    Back to all plugins active again – (Not the Code Snippet and Relevansi) and the search works so we are 90% fixed with your magic and good work.
    If possible maybe we can get the pre-find with picture to work?
    And you could point me in a direction to edit the search result page to look better? :-)

    #1041588

    Hi,

    Thanks for the update. The ajax search is still not working on my end. Did you add this snippet after installing relevanssi?

    // https://kriesi.at/documentation/enfold/search/#use-relevanssi-in-search-instead-of-the-default-search

    Please disable it temporarily.

    Best regards,
    Ismael

    #1041798

    Hi
    Nope – I didn’t – I did add some code I found on Relevansi’s site

    /**
    * Making Search work better with RELEVANSSI
    */
    
    add_filter('avf_ajax_search_function', 'avia_init_relevanssi', 10, 4);
    function avia_init_relevanssi($function_name, $search_query, $search_parameters, $defaults)
    {
        $function_name = 'avia_relevanssi_search';
        return $function_name;
    }
    
    function avia_relevanssi_search($search_query, $search_parameters, $defaults)
    {
        global $query;
        $tempquery = $query;
        if(empty($tempquery)) $tempquery = new WP_Query();
    
        $tempquery->query_vars = $search_parameters;
        relevanssi_do_query($tempquery);
        $posts = $tempquery->posts;
    
        return $posts;
    }
    add_filter( 'relevanssi_modify_wp_query', 'rlv_meta_fix', 99 );
    function rlv_meta_fix( $q ) {
    	$q->set( 'meta_query', array() );
    	return $q;
    }
    

    But no diff…
    I activated relevansi plugin again and tried your code for Enfold – Now search is BROKEN again (With or without the Relevansi code above?? :-(

    Now we are back to the beginning of the error – The Ajax Dropdown works again on https://BizDoktor.dk but the search page shows NADA :-(((
    I have set the “6” into line 1328 and removed all the relevansi scripts/code (yours and the above) in functions.php and disabled relevansi so we have a clean Enfold site (relative clean…)
    No search page result is working (perhaps the update(s) to day did something?
    (I dont plan to update to WP5.0 or Enfold 4.5.1 yet)

    NOW: (Update)
    SEARCH PAGE WORKS!!! Ajax dropdown works? ??? !!! ??? :-)))
    Am I dreaming?
    It must be your magic – only diff is the “6” in line 1328
    No relevanssi – no code in functions.php ?? Pure Kebab ??

    • This reply was modified 5 years, 11 months ago by Netzie.
    #1041998

    Hi,

    I did add some code I found on Relevansi’s site

    That is the same code from the docs, so you have to remove it if Relevanssi is disabled. And you’re probably checking a cached page at first.

    SEARCH PAGE WORKS!!! Ajax dropdown works? ??? !!! ??? :-)))

    I can’t see any posts on the search results page. Is it working on your side? I think my magic kebab didn’t work.

    Best regards,
    Ismael

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.