• Disclaimer: This is my first post and I am very new to web development in general, let alone WordPress/Multisite development.

    I have a home page(run on WP) and 3 separate blogs linked to this page using multisite to create a small network. I understand that(through multisite) only one install of WP runs natively and the other 3 are running virtually. I have two questions…

    I notice that all the blogs share the same php template files. I would like to have different pages display different links in the main nav menu. For my main site I created pages and linked them using the inlcude() function. In my sub-sites the pageIDs from my main site are not recognized, so this method does not work. I’m not sure how to link to these pages and have it correctly displayed/styled in my main navigation menu.

    Short Version: How can I link pages between the few blogs I have created through multisite and have it displayed properly in my nav menu?

    Second question: Should I be using Multisite to run only 4 blogs?

    I will be managing the main blog as well as two others and the remaining blog will be managed by a friend. I want to keep this as simple as possible. Incase I have been unclear; all I want to do is run a small site with a few separate blogs managed individually, mainly by myself… multisite or simpler, smaller scale solution?

Viewing 11 replies - 1 through 11 (of 11 total)
  • jack randall

    (@theotherlebowski)

    my best suggestions would be to install the same theme on all of the blogs in your network then in each blog create a menu in the appearance section of your admin dashboard and create a series of absolute links (https:// type links) that link back to the main site (this will take visitors back to the main site to view the page though).

    or your other option is to copy and create the same pages in all of the blogs so you have access to them in any blog. i’m sure there’s a more elegant code hack to get it done and while i know some php it’s way beyond me…

    if i were running a few blogs then i’d go multisite just to cut down on the number of times and places you have to upgrade things. it’s a very good way of streamlining your work flow.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    It’s a very simple code hack, actually.

    Make a menu in blog #1 called mainmenu or such, and then you call it in your theme like so:

    <?php switch_to_blog(1); ?>
    <?php wp_nav_menu( array( 'menu' => 'mainmenu' )); ?>
    <?php restore_current_blog(); ?>

    As for question two, I use multisite to run three (and on another site 6) separate blogs, where I WANT them separate ?? So … if you wanna, sure.

    jack randall

    (@theotherlebowski)

    i knew there was a php way to do it ?? i wish i was more logical and then i could actually understand web programming! design coding i can do, the business logic is where i fall over on my face…

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    It just takes practice and knowing what docs to read ?? Don’t worry, we all start with ‘Okay, I want to pull Foo from X. How do I do that?’ You work your way to psudeo code:

    Go to Blog 1
    Get menu
    Print on Blog 2-n

    And then you start googling how to get to blog 1 for ONE line of code and it all comes together.

    jack randall

    (@theotherlebowski)

    when i’ve got more free time i’ll get back into it. even though it was frustrating and tricky it was fun ??

    Thread Starter winmadden

    (@winmadden)

    Hey, thank you both for your input! I will play with these solutions and report back. Again thanks for taking the time here.

    Thread Starter winmadden

    (@winmadden)

    Okay, I have been able to integrate the code ipstenu suggested and both of your feedback has helped me to better understand this linking process. However, I am still having a hard time wrapping my head around the use of pages through multisite. If either of you guys could find time to help me out that would be awesome.

    How is this process of sharing page templates through my various sites actually working? I know I am missing something major in understanding how this works because I don’t get how I am supposed to edit one blogs structure without affecting the others in my network. This seems anti-intuitive to me as I assume most people using multisite WANT to have completely different sites.

    Is there a better/more efficient solution(maybe through php?) than creating page templates for every different page throughout my various blogs?

    How is this process of sharing page templates through my various sites actually working?

    They are physically using the same exact files. And of the php calls within those files looks up the specific blog info in the database.

    Why are you creating different page *templates*? You only need to type in different content within the admin area to show what you want on a page.

    Also a link to your sites & page you’re making would help.

    Thread Starter winmadden

    (@winmadden)

    I was thinking of creating alternate page templates as a solution to displaying each blog a bit differently.

    As a hypothetical example, I want one index page to have a side bar and the index page of another blog(I realize they are using the same “physical” index file) to exclude the side-bar. If I remove the <?php get_sidebar(); ?> from the index.php file all blogs are affected rather than just the one(s) I want.

    I realize I may be over complicating things, but I appreciate the help!

    Here’s the site, very rough, still just trying to get a skeleton in place with all pages and navigation set up correctly.

    Thread Starter winmadden

    (@winmadden)

    I was thinking of creating alternate page templates as a solution to displaying each blog a bit differently.

    As a hypothetical example, I want one index page to have a side bar and the index page of another blog(I realize they are using the same “physical” index file) to exclude the side-bar. If I remove the <?php get_sidebar(); ?> from the index.php file all blogs are affected rather than just the one(s) I want.

    I realize I may be over complicating things, but I appreciate the help!

    Here’s the site, very rough, still just trying to get a skeleton in place with all pages and navigation set up correctly.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Linking between sites’ is closed to new replies.