Skip to:
Content

BuddyPress.org

Ticket #967: reduce-queries-bp_dtheme_show_home_blog.patch

File reduce-queries-bp_dtheme_show_home_blog.patch, 679 bytes (added by junsuijin, 16 years ago)
  • bp-themes/bp-sn-framework/functions.php

     
    6868}
    6969add_action( 'wp', 'bp_dtheme_show_home_blog', 2 );
    7070
     71        function bp_dtheme_filter_home_query( $query ) {
     72                global $bp;
     73
     74                if ( $bp->current_component != BP_HOME_BLOG_SLUG )
     75                        return $query;
     76
     77                // nullify the initial query
     78                remove_filter( 'posts_request', 'bp_dtheme_filter_home_query', 0 );
     79                return;
     80        }
     81        add_filter( 'posts_request', 'bp_dtheme_filter_home_query', 0 );
     82
    7183?>
     84 No newline at end of file