• Resolved nikidexa

    (@nikidexa)


    Hi, I would like to exclude menu bar in ayax results. If I set a category name like search term that appears in menu bar thhe firsts results in drop down are ok and matching the corrects products, but the others results shows all products becouse the search term appears in menu bar.
    Other question: is possible to set a number of maximum results in ajax search(drop down)?

    Im using Flatsome theme.

    Thank you

    • This topic was modified 3 years, 10 months ago by nikidexa.

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

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

    (@msaari)

    The Flatsome Ajax search does not always work perfectly with Relevanssi. See here for instructions on how to make it work better.

    You can probably adjust the number of results found somewhere in Flatsome settings (Flatsome support can help you out better here), but if that doesn’t work out, you can modify the function on the page above to this:

    function rlv_flatsome_search_function( $query, $args, $defaults ) {
      $_wp_query = new WP_Query();
      $_wp_query->parse_query( $args );
      $_wp_query->set( 'posts_per_page', 10 ); // <-- this would set the search to show 10 results
      relevanssi_do_query( $_wp_query );
      return $_wp_query->posts;
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Exclude menu bar from search’ is closed to new replies.