| | 131 | /* WP 3.0 requires there to be a non-null post in the posts array */ |
| | 132 | function bp_dtheme_fix_the_posts_on_activity_front($posts, $wp_query) { |
| | 133 | // NOTE: the double quotes around '"activity"' are thanks to our previous function bp_dtheme_fix_get_posts_on_activity_front() |
| | 134 | if ( empty($posts) && !empty($wp_query->query_vars['page_id']) && '"activity"' == $wp_query->query_vars['page_id'] ) |
| | 135 | $posts = array( (object) array( 'ID' => 'activity' ) ); |
| | 136 | |
| | 137 | return $posts; |
| | 138 | } |
| | 139 | add_action( 'the_posts', 'bp_dtheme_fix_the_posts_on_activity_front', 10, 2 ); |
| | 140 | |