Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

@blulnk blulnk commented Aug 13, 2020

where do you upload this php?

@Cristal-Solutions

This comment has been minimized.

Copy link

@Cristal-Solutions Cristal-Solutions commented May 11, 2021

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