• Resolved webauthor

    (@webauthor)


    Hi Guys –

    Two questions but first off let me say that everything is working great!

    We’re using the shortcode to display a search field but wanted to know if there was a way to limit the number of search results that automatically appear? Is there way to set the limit to no more than 5 results?

    Also, if you just start typing into the search field, for example…

    How do I..

    you immediately start seeing results below the search field with relevant FAQs (I love the way that works BTW). Is there a way to add a paragraph or line break under the search field so that there is more blank space below the search field and the results that appear? The results are too close to the bottom of the search field itself. Do you have some custom CSS that would allow for more of a gap?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi web,

    There’s no option to limit the number of results returned. The only way to do it would be directly in the plugin code. In the “Display_FAQ_Search.php” file in the “Functions” folder, you’ll see that it returns the results using the [ultimate-faqs] shortcode. You could add the following attribute to the shortcode to limit the number of posts returned:

    post_count='5'
    

    You could try adding the following custom CSS to create more of a buffer between the search field and the results:

    #ufaq-ajax-form {
    margin-bottom: 48px;
    }
    
    Thread Starter webauthor

    (@webauthor)

    Thank you! Worked perfectly. The file Display_FAQ_Search.php was not in the Functions folder but rather in the Shortcodes folder. Nevertheless, I love the fact that you not only give us a working answer, but you also take the time to enlighten us as to help ourselves figure things out on our own.

    The CSS you provided worked flawlessly. Again, remarkable support every time I have a question. If there were 25 stars instead of 5, you’d earn it!

    Hi web,

    Sorry about that mix up, it’s definitely in the “Shortcodes” folder! And thank you very much for the kind words!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to Limit Search Results’ is closed to new replies.