Helping you Build Your Own Social Network!

Faster, better and easier!

Unified-Search Question

(2 posts) (2 voices)
  • Started 1 year ago by pisanojm
  • Latest reply from Brajesh Singh

  1. How can we limit the amount of results returned in each section (or globally) of the unified-search mod that you made?

    That is -when I search the activity or forums, I get too many results displayed on the page… is there anyway to limit this with your code? “X” amount of returns before we see the “load-more” per section?

    Thanks.

    Posted 1 year ago #
  2. Hi there,
    First of all sorry for my this delayed response. I have just been back to work and now onwards will be regular.

    Now about the code,
    You will need to change the function function "bpmag_global_search_qs"
    change the function

    function bpmag_global_search_qs(){
    	return "search_terms=".$_REQUEST['search-terms'];
    }

    to

    function bpmag_global_search_qs(){
    	return "per_page=10&max=10&search_terms=".$_REQUEST['search-terms'];//change per_page and max
    }

    You may change the limit per_page and max to any value you want.

    Hope that helps.

    Ps: I moved the topic to how to section in order to make it visible for non members/visitors too. Hope you don't mind that.

    Posted 1 year ago #

Reply

You must log in to post.