WordPress.org

Ready to get started?Download WordPress

Forums

Three Sites. Some Shared Pages. How? (20 posts)

  1. rwilliams1961
    Member
    Posted 4 years ago #

    I need help with something that I haven't found an answer to.

    I have one business with three storefronts. Each storefront has a website. I have not yet used MU, but am in the process of figuring how to set that up now. Related to that:

    I am not blogging, but will within a few months. For now, my issue relates to Pages on my WP website.

    The three websites (one for ea storefront) will be identical. All three storefronts will share some pages. Each store, however, will have a couple of unique pages. I want to be able to update the shared pages and have all three websites update. HOWEVER, I want each store manager to be able to update their own unique pages. I don't want managers to have access to another store's pages. I don't want the managers having access to the pages that span all three stores.

    Can this be done? If so, how?

    Thanks so much.

  2. rwilliams1961
    Member
    Posted 4 years ago #

    I'm still unsure how to share some aspects of the database between different MU sites. I need some pages to be shared between sites and others to be unique to each site within the parameters I wrote about above.

    I need help with this ASAP. Thanks!

  3. By default, separate sites means ... separate sites. There's not meant to be crossover like that.

    All three storefronts will share some pages.

    Like what?

    If it's just the standard 'about, contact, etc' pages, then perhaps you should make your MAIN site (one that only YOU can admin) have that info. Then each manager edits their site as needs be, but you control your main site. But it kind of depends what these pages are :)

  4. just before where you want the main blog pages put
    <?php switch_to_blog(1); ?>
    now put in the page call as usual, or hadcode the link - your choice.
    then do
    <?php restore_current_blog(); ?>

    then it will always show the pages from Blog #1.

    Follow that with the regular page call and it will pull the blog specific pages.

  5. rwilliams1961
    Member
    Posted 4 years ago #

    andrea,

    i just looked that function up on google. i still don't quite understand what we're doing with the switch_to.

    so i have the top nav bar/menu. and i have, say, five links. two are unique to this install. three are shared among all three installs.

    1) i don't see how i can insert that php code. in fact, i'd bet money that's not what you meant.
    2) since that isn't what you meant... ?

    can you explain?

  6. you're switching to the MAIN site, like you said you wanted to pull pages from, that's what the 1 is in the code.

    this way, when you update the pages on the main site, all sites will show those pages. the pages you want to share.

    This is basically the only way to do it - pick a site that you make the pages from, then use those on the other sites.

  7. What Andrea said will work, but IMO there's an easier way :)

    and i have, say, five links. two are unique to this install. three are shared among all three installs.

    Since they're all using the same theme, this can be really easy.

    Make FOUR sites. One is your main 'front' site. Three are your storefronts.

    On the main site, make your pages.

    In your THEME make sure the top menu can utilize the nav_menu feature, new in 3.0 (read How to Add Custom Navigation Menus in WordPress 3.0 Themes for help on that).

    Make a menu for each site :) It'll have their special whatevers and ALSO your three static pages.

    You're done! Have some tea.

  8. rwilliams1961
    Member
    Posted 4 years ago #

    As for the theme, they all use a similar theme, but there will be slight variations in some graphics. I suppose I could use PHP to change those graphics per domain name?

    So your advice can work using three separate (but nearly identical) themes?

  9. rwilliams1961
    Member
    Posted 4 years ago #

    okay. i've gone off and read a bit more (thanks for the link, ipstenu).

    a very important question. i don't understand one thing (prolly more, but one that i'm aware of here). i've changed functions.php to have this:

    add_theme_support( 'menus' );

    i've got appearances-menus going. cool. getting there. but with these four sites, how do i include the menu from the "main" site on all the sites? ALSO, i have pages unique to the three storefronts. how do i add that to the same nav bar?

    help me rock this thing. i feel i'm close...

  10. but there will be slight variations in some graphics. I suppose I could use PHP to change those graphics per domain name?

    Or a css plugin.

    i've got appearances-menus going. cool. getting there. but with these four sites, how do i include the menu from the "main" site on all the sites?

    I believe what ipstenu is saying is, for the "shared" pages, just put in actual links to the pages from the main blog in the menus on the sub blogs.

  11. rwilliams1961
    Member
    Posted 4 years ago #

    i have been reading my butt off, and am still pretty confused.

    let me give you an exact example of what i need to accomplish, if possible.

    main site uses database #0. storefront one uses database #1. the pages contained in db#0 are allowed to be placed on every storefront site, if the storefront manager wants to use them. db#1 contains pages unique to storefront one.

    another twist. storefront managers CANNOT be allowed to edit db#0 pages. for example, storefront one can ONLY edit pages contained in db#1.

    i am totally open to the main site and storefronts sharing a database. but if they do, the above rules apply.

    whew! what i want isn't doable, is it?

  12. Right, and both suggestion we offer do what you want.

    In Ipstenu's suggestion, she's saying write the pages in blog 1. Owner of blgo two goes and looks at the page link from blog one. Copy the link. paste it in the menu in the backend.

    If you;re using the multisite feature, all sites are in the same database. (but if you're c&p the link, that doesn't matter a bit).

  13. rwilliams1961
    Member
    Posted 4 years ago #

    thanks and crap! i don't understand how to accomplish the goal with what you wrote. let me tell you what i've done so far. i've put the following into functions.php:

    add_theme_support( 'menus' );

    function register_my_menus() {
    register_nav_menus(
    array(
    'central-menu' => __( 'Central Menu' ),
    'austin-menu' => __( 'Austin Menu' ),
    )
    );
    }

    i've put this into the template for the main site and also for storefront one:

    <?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'menu-header' ) ); ?>

    there is one more issue i'm unsure about. when i want to call the central menu, for example, i don't know how to name the main site's menu "central menu."

    i feel like i'm on the verge of understanding, but there's some piece of the puzzle and some knowledge that i am totally missing.

    thanks for getting me through this. it means a lot. (and it's really exciting. i think i'm going to become addicted to this software!)

  14. rwilliams1961
    Member
    Posted 4 years ago #

    actually, let me clarify.

    i understand about hard coding the urls, but that isn't good since we will add new pages on occasion and we need the menus to be updated automatically so we don't have to go in and hard code new pages into the storefronts.

    sorry. i should have made that clear.

  15. then go back to what I said here.

    Open up your theme files. Find where the menu bar is. See the php function to pull the pages? that will pull the pages of the blog it is on. Before that code, put the code I gave you up above. now it will pull the pages from the main blog and show the links on the other blogs. And it will update when you add new pages.

    That's the best you're gonna get.

  16. rwilliams1961
    Member
    Posted 4 years ago #

    okay. making sense. with one caveat (and no, i wasn't put here by former friends intent on torturing you). you refer to:

    <?php switch_to_blog(1); ?>

    where does the "1" come from? i assume it is attached to the main site's menu. do i need to give that menu a number or is that the name of the menu, using the example from above, "central-menu"?

    further, the pages listed on the storefront's menu, are they automatically listed after <?php restore_current_blog(); ?>

    i swear, i really am this baffled and am not planning to come over and boil a bunny after driving you crazy.

  17. <?php switch_to_blog(1); ?>

    where does the "1" come from? i assume it is attached to the main site's menu. do i need to give that menu a number or is that the name of the menu, using the example from above, "central-menu"?

    <?php switch_to_blog(1); ?>

    That's the ID # of the main blog. :)

    further, the pages listed on the storefront's menu, are they automatically listed after <?php restore_current_blog(); ?>

    as long as you put another page function there, yes.

    i swear, i really am this baffled and am not planning to come over and boil a bunny after driving you crazy.

    I have four kids, 3 of them are grown and they were/are all homeschooled. I can handle all kinds of crazy now. :D

  18. rwilliams1961
    Member
    Posted 4 years ago #

    well, i gave up and went to elance for help. my vietnamese helper is now asleep in his warm bed. the last we emailed before he headed off to dreamland, he wrote:

    Your website was not created by multiblog and multiuser functionality of wordpress 3.0. They are all separate wordpress installtions. That's why you cannot change the main blog content from storefront admin.

    is there a specific way to build multi-user? i simply added four users to the database. is that not right?

  19. rwilliams1961
    Member
    Posted 4 years ago #

    that last paragraph was me asking, not my elance provider.

  20. WordPress has a multiple blog functionality now built in 3.0.

    http://codex.wordpress.org/Create_A_Network

    And you're in the forum section for this feature. :)

    So, that explains the confusion...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags