You might make use of following code
//Main blog has always id as 1, so you can write
get_header();
if($wpdb->blogid == 1) {
//do something
} else{
//do this
}
if possible i’d like to ask another question:
i want to show in the main blog the recent post from ALL blog, and in the sub blogs only the post from that SINGLE blog.
the if condition is ok, and the main blog call all blogs recent posts:
$posts = bp_blogs_get_latest_posts( null,10 ) ?>
it is working fine for the main blog, now i must think to sub blogs. How can i edit it for showing only the current blog recent posts changing only a line?
You can make use of widgets available in BuddyPress and WordPress.
yes i know, but i’m working on a particular blog: users need to have all the same ready made interface, thay are not allowed to activate or deactivate widgets in that area. This will be a free theme/application that i’ll share as usual with the community
no problem, i’m gonna see the light
updated: ok solved!
In that case you can take the code or functions from widget and use them in your theme.
there is a conditional function:
is_main_blog()
– Nicola