• My company uses WordPress for our intranet with great success. However, we’re getting ready to open new offices in a couple of different locations, and I’m having some trouble figuring out how to expand it the way I want.

    What I’m looking for is a single blog shared between all locations, a wiki-style set of “knowledge base” pages shared between all locations, and then a set of location-specific pages for things like policy manuals and maps which would change between offices.

    This would be easy enough to do with subdomains such as blog.domain.com, wiki.domain.com, and office1.domain.com (or office2, etc), but I would like to have a single header for each office which doesn’t change when you click over to another section.

    How do I integrate a blog from a different subdomain (or subfolder) into a single menu structure? For instance, if the top nav menu says “Blog | Wiki | Office”, how would I make “Office” always go to the local installation even if it was clicked on the blog section which is shared by all?

    Sorry, I’m not sure I’m explaining this very clearly…

Viewing 6 replies - 1 through 6 (of 6 total)
  • hardcode the link in the theme.

    Thread Starter jnorion

    (@jnorion)

    Hmm. I’m not quite sure if that would do it, but I may be misunderstanding what you’re saying. Let me see if I can clarify and if that still seems like the answer I may have to ask for more detail from you.

    Person A visits office1.domain.com. After viewing a couple of pages, he then clicks the “Blog” link in the nav menu, which redirects to blog.domain.com. Person B visits office2.domain.com and eventually clicks the “Blog” link as well, which also directs to blog.domain.com. So far so good, because they’re both seeing their specialized content first and then a shared blog second.

    Here’s the catch: while viewing blog.domain.com, Person A clicks the “Office” link. This should redirect them back to office1.domain.com. But if Person B clicks the same “Office” link, it should go to office2.domain.com.

    Because the link is located on the blog.* subdomain, both visitors will see the same code. So I’m not quite sure how to code that to dynamically choose which it would go to. Is there a method I don’t know of?

    Or, am I going about this wrong? Is there another way to make a shared blog embed in a site, so that they’d never leave the office*.domain.com site in the first place?

    Thanks!

    Yeah, that’s different. It sounded like you wanted to do the opposite.

    Here’s the catch: while viewing blog.domain.com, Person A clicks the “Office” link. This should redirect them back to office1.domain.com. But if Person B clicks the same “Office” link, it should go to office2.domain.com.

    so you need to determine where they came from a I guess. (it’s not really multisite specific – would be similar to sending people back to language specific content)

    Thread Starter jnorion

    (@jnorion)

    That makes sense. So I guess the evolved question (I really didn’t do a good job explaining the first time around, did I? ?? ) is more along the lines of this: is there a way to accomplish this that IS multisite specific?

    For instance, is there a way to keep track of a specific user’s “home” site? This is assuming that all sites would be part of the same multisite network, and that only a couple of admin users would be registered on the main site. So the normal user would be a member of, say, the office2 subsite and have guest access to the blog and wiki subsites. Now that I think about it, this may be easier using subdirectories rather than subdomains.

    Then I could create a menu like this (including hypothetical WP function):

    <a href="intranet.domain.com/blog>Blog Subsite, same for all</a>
    <a href="intranet.domain.com/wiki>Wiki Subsite, same for all</a>
    <a href="intranet.domain.com/<?php wp_user_home_site(); ?>/policy">Local policy manual, displayed based on user name</a>

    Or some other way that WordPress could help determine this sort of thing?

    AHA!

    Now I get it… you CAN check for a user’s main blog.. if they are the admin of it. It’s called their primary blog.

    this one might help:
    https://codex.www.ads-software.com/Function_Reference/redirect_user_to_blog

    or
    https://codex.www.ads-software.com/Function_Reference/get_active_blog_for_user

    Argh I know there’s another one…

    Thread Starter jnorion

    (@jnorion)

    The second one looks helpful to me. Although I’m not quite sure how it determines which blog is the primary one. It doesn’t mention the admin requirement on the codex page… is that the only way it would have a primary blog set? Or would it do the same if someone was only added as a user to one subsite, and was left as a guest on the others?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Location-Specific Mulitsite Content?’ is closed to new replies.