Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search activity from title or member name


  • inderpreet2018
    Participant

    @inderpreet2018

    Hi,

    Can I search from event title or member name on activity page?
    2019-03-19_1216
    2019-03-19_1217

    Thanks

Viewing 9 replies - 1 through 9 (of 9 total)

  • Venutius
    Moderator

    @venutius

    You can enable search for names by putting this code in your child themes functions.php:

    add_filter( 'bp_activity_get_include_user_search', 'venutius_add_name_to_search' );
    
    function venutius_add_name_to_search( $setting ) {
    	return true;
    }

    Unfortunately there’s not a similar filter for the title, you could raise a feature request for this on https://buddypress.trac.wordpress.org/


    inderpreet2018
    Participant

    @inderpreet2018

    I added above script to the function file, but it still not searching for the name.
    2019-03-20_1136


    Venutius
    Moderator

    @venutius

    It worked when I did it so maybe you’ve not done it correctly?


    inderpreet2018
    Participant

    @inderpreet2018

    I write in same way, as you send above in function file. But nothing worked.


    Venutius
    Moderator

    @venutius

    All I can suggest is that you are not copying the functions.php file into the right theme directory, not likely but that could cause the new function not to be seen.


    Venutius
    Moderator

    @venutius

    Hi there, I found another filter for you to try:

    add_filter( 'bp_activity_get_include_title_search', '__return_true' );


    inderpreet2018
    Participant

    @inderpreet2018

    I added the above filter to function.php file, but that’s not working at all
    2019-03-24_1458
    2019-03-24_1500


    inderpreet2018
    Participant

    @inderpreet2018

    any help??


    inderpreet2018
    Participant

    @inderpreet2018

    any reply?

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.
Skip to toolbar