Skip to:

Activity Stream Loop filtering: include optional and search_terms optional

  • tifire


    Based on buddypress codex page:

    There are different filtering optionals for the activity stream loop. I tried to use the following two optionals:
    * search_terms optional (Return only activity items that match these search terms)
    * include optional (Pass an activity_id or string of comma separated ids to show only these entries)

    What I wanted to do is to use a search term to get the specific activity from a list of activities. For example, I used the following querystring:
    $querystring = ‘search_terms=’.$_REQUEST.’&include=616,617,618,825, 823, 819′;

    When using the $querystring to call the action bp_ajax_querystring, it showed all activity posts with activity ids to be 616,617,618,825, 823, 819. The search term didn’t seem to work at all, no matter what terms I used.

    Shouldn’t the filtering result be the activity post that matches the search term WITHIN the include optional scope (which is 616, 617, 618, 825, 823, 819 in this case)? If not, how can we use another optional with the include optional?

    Can someone help? I really need a way to filter a list of activity (using ids) by keywords. This is the key to my project.

  • The topic ‘Activity Stream Loop filtering: include optional and search_terms optional’ is closed to new replies.
Skip to toolbar