TransWikia.com

Simple Search results limiting not working

ExpressionEngine® Answers Asked by FuriousD on December 2, 2021

The search is working fine however the search results are not being limited. Any ideas?

    {exp:search:simple_form 
        channel="about|approach|blog|job-ads|solutions|who_we_help" 
        search_in="entries"
        results="3"
        result_page="search" 
        no_result_page="search/no_results"
    }
        <input type="hidden" name="XID" value="{XID_HASH}" />
        <input id="keywords" name="keywords" placeholder="TYPE AND PRESS ENTER" type="text">
    {/exp:search:simple_form}

2 Answers

If you can't add a limit= parameter, you can inside your {exp:search:search_results} tag limit by count:

{exp:search:search_results}
  {if count <= 3}
    {title}
  {/if}
{/exp:search:search_results}

Answered by jphansen on December 2, 2021

I've just tried and everything looks fine to me. The only thing I can think of that was different in my code is the results_page parameter, I've got search/results instead of just search.

My code:

{exp:search:simple_form
    channel="my|channels"
    search_in="entries"
    results="3"
    result_page="search/results" 
    no_result_page="search/no_results"
  }

Maybe if you change your's to search/index?

Answered by Laura Montgomery on December 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP