Determine if is main blog
-
Hi.
I need to determine if the current blog in a network subdomain installation is the main blog, and do one thing if it is, and another if it isn’t.What I have so far is this:
<?php $blogid = $wpdb->get_blog_prefix(BLOG_ID_CURRENT_SITE); ?> <?php if $blogid="1" { run some code } else {run some other code}; ?> <?php endif; ?>
I know this won’t work cause this isn’t valid code, but just an outline of the idea of what I need. Is there a kind and helpful coder out there that would like to lend a hand with this? 🙂
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Determine if is main blog’ is closed to new replies.