Forums
-
- Forum
- Posts
-
- Installing BuddyPress
- 23,982
- How-to & Troubleshooting
- 129,316
- Creating & Extending
- 25,784
- Requests & Feedback
- 9,479
- Third Party Plugins
- 9,784
- Showcase
- 3,317
- Ideas
- 1,400
- Miscellaneous
- 9,166
-
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' );
See also: WordPress.org • bbPress.org • BuddyPress.org • Matt • Blog RSS