In a site's header.php which is in a child theme shared by the root and 4 other sites on a network (using MU configured in directories) I need to identify which site/sub-site is being shown and subsequently look for other conditionals.
I've seen mention of get_blog_id_from_url, get_current_site and blog_id as potential methods, some more reliable than others. Which is the better approach?
I basically need the following (oversimplified):
If site 2, then
- if is_single() {echo some code}
- elsif is_template() {echo some code}
elsif site 3, then
- same as above but with different output
I'm essentially coming up with a rudimentary way to implement conditional menus. Plugins I have tried haven't worked as they were supposed to and I don't want to rely on a plugin for such a vital function.
If someone could lend a hand to figuring this out, it would be much appreciated.