Created
April 3, 2019 03:20
-
-
Save KaineLabs/941b4a606857f5dbbdae54b2df7af5b9 to your computer and use it in GitHub Desktop.
Make Buddyboss Global Search Supports Youzer Posts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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' ); |
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
where do you upload this php?