…’,’, array_keys( $results ) ) . “)” ); $child_posts = array_flip( $child_posts ); array_walk( $results, function( &$weight, $post_id ) use ( $child_posts ) { if ( ! isset( $child_posts[ $post_id ] ) ) { // Not a child post. $weight *= 10; } } ); return $results; } ); Weight……$match; } // Or use this, but definitely not both add_filter( ‘relevanssi_results’, ‘date_weights’ ); function date_weights( $results ) { array_walk( $results, function( &$weight, $post_id ) { $post_date = get_the_time( ‘U’, $post_id ); if ( time() – $post_date < WEEK_IN_SECONDS ) { $weight = $weight * 2; } else { $weight……&& isset( $custom_field_detail->field_name ) ) { $match->weight *= 2; } return $match; } Adding extra weight to users Relevanssi Premium doesn’t have an easy setting to increase the weight of users in the results. This function will double the weight of user profiles: add_filter( ‘relevanssi_results’, ‘rlv_user_weights’ ); function rlv_user_weights( $results…