Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How can I set “Show NewBlogPosts” as default on acitivity-stream?


Boone Gorges
Keymaster

@boonebgorges

OK, here’s a bit of a refinement.

function blog_posts_by_default( $query_string ) {
global $bp;

if ( !$query_string )
$query_string = '';

if ( ($bp->current_component == BP_ACTIVITY_SLUG || !$bp->current_component) && !strpos($query_string, 'type='))
$query_string .= 'type=new_blog_post&action=new_blog_post';

return $query_string;
}
add_filter( 'bp_dtheme_ajax_querystring', 'blog_posts_by_default' );

Skip to toolbar