Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #445524

    Hello Enfold.
    I just had relavanssi installed (also AJAX results, thanks for the help) and I have a few issues.

    The ajax results are too many. I found some css here too limit the search box and add a scrollbar(https://kriesi.at/support/topic/limit-ajax-search-results-with-relevanssi/). that works nice. But the you still have to many results (10 pages alone, and then some portfolio items etc.)

    I would like to old amount back if possible.

    Also relevanssi finds html tags when searching in the ajax box. This:
    add_filter(‘avf_ajax_search_excerpt’,’avia_strip_search_result_tags’, 10, 1);
    function avia_strip_search_result_tags($content){
    $content = strip_tags($content,”);
    return $content;
    }

    Didn’t do anything.

    And last

    The tags for the blog don’t work anymore.

    any ideas on these issues?

    #446164

    Hi WolfvanHaeren!

    Thank you for using Enfold.

    Please add this in the functions.php file to limit the number of posts for each post type to 3:

    add_filter('avf_ajax_search_query', 'avf_modify_ajax_search_query', 10, 1);
    function avf_modify_ajax_search_query($search_parameters)
    {
    parse_str($search_parameters, $params);
    $params['numberposts'] = 3;
    $search_parameters = http_build_query($params);
    return $search_parameters;
    }

    You can adjust the numberposts value if you want.

    Cheers!
    Ismael

    #446243

    Hello Ismael,
    I am afraid this didn’t help. I still have like 20 results. Most of it is a lot of pages as results and just a couple portfolio and posts.

    Also do you have any idea for the other issues, html tags in the AJAX results and the tags for posts that don’t work anymore?

    cheers

    Wolf

    Also is it possible to force the results in an order page results- post results- portfilio results.

    Now sometimes portfolio comes first. That is something we don’t really like.

    Cheers

    • This reply was modified 9 years, 4 months ago by Wolf.
    #446921

    Hi!

    The code works on our installation. Ajax search result per post type is limited to 3. The excerpt should be hidden on the ajax results. Please update the theme to 3.1.5.

    Best regards,
    Ismael

    #447013

    I have removed relevanssi the tags need to work. This can be closed

    thanks for the help

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Relevanssi issues’ is closed to new replies.