Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/941b4a606857f5dbbdae54b2df7af5b9 to your computer and use it in GitHub Desktop.
Save KaineLabs/941b4a606857f5dbbdae54b2df7af5b9 to your computer and use it in GitHub Desktop.
Make Buddyboss Global Search Supports Youzer Posts
<?php
/**
* Make Buddyboss Global Search Supports Youzer Posts.
*/
function yzc_buddyboss_global_search_integration( $sql) {
// Post Types.
$post_types = "'activity_update', 'activity_link', 'activity_file', 'activity_file', 'activity_audio', 'activity_photo', 'activity_video', 'activity_quote', 'activity_status','activity_slideshow'";
$sql = str_replace( "AND a.type = 'activity_update'","AND a.type IN ( " . $post_types .")", $sql );
return $sql;
}
add_filter( 'BBoss_Global_Search_Activities_sql', 'yzc_buddyboss_global_search_integration' );
@blulnk
Copy link

blulnk commented Aug 13, 2020

where do you upload this php?

@Cristal-Solutions
Copy link

Please paste it in your child theme : wp-content/themes/your-child-theme-name/function.php.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment