• Hello,
    I have a unique requirement.
    a. My sub-sites can’t have users. They are all present in the main site.
    b. My main site should list all the blogs of the subsites
    c. The sub-sites should use categories of the main site.

    Is there a way that the sub-sites use the wp_posts table of the main site with only those posts with user as the subsite user admin? And all the other tables as well – post_meta, term, term_relationship, taxonomy, etc

    Where do I need to change the code so that the queries made are against the parent tables by the sub-sites.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter iexperience

    (@iexperience)

    So when a user logs in to the subsite, he sees blogs that are pulled from the main sites tables that belongs to the same user.
    His categories are same as the parent site and his uploads go to the main sites tables (wp_posts)
    Same with all the plugins.

    Any help is highly appreciated.

    Thread Starter iexperience

    (@iexperience)

    primarily I want the user to be able to play the role of a contributor to my main blog + have the capability of theming his own site that pulls his specific information (like blogs, etc) from the main blog.

    Kindly suggest,

    Thanks
    Shikhar

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Why multisite at all?

    If your users are all posting on the main-site, what’s the point of the children sites?

    Thread Starter iexperience

    (@iexperience)

    Hi Ipstenu,
    Thanks for replying back. The community doesn’t seem that active.
    Actually these users are going to be my customers.
    We will be helping them build websites of their own. Hence the multisite architecture – help us with theming, having separate domains, etc. But we’ll also help them sell their stuff on our portal. Thats the parent site(the main domain).
    Now the parent site could either pull data from all the child sites or all the child sites could store the data in the parent tables and have only configuration details in their own tables. Since the child tables wont have much data to store, my guess is to have all that data in the parent table.
    Makes some sense?
    Any help is highly appreciated.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    You don’t have to use Multisite to build ‘own websites’ and unless you’re going to give them full admin access to their own sites, Multisite is wasted in your situation. Which… you still haven’t said you’re doing, hence my skepticism that this is the right path for you πŸ™‚

    Will they be posting their own content on their own sites? If the answer to this is NO, then you need to STOP. Seriously think about that. Multisite is for multiple separate sites. So if they’re not really running that, you don’t want to mess with this. It’s not worth the time you’ll spend turning off everything that makes it Multisite.

    If you are going to use Multisite, generally you would want to use something like http://wordpress.org/plugins/wordpress-mu-sitewide-tags/ to pull posts from the child sites to a main site.

    Thread Starter iexperience

    (@iexperience)

    Hi Ipstenu,
    Thanks for your response. Yes my customers will have separate sites. But they’ll have one single type of structured data.
    These sites wont have users of their own, categories of their own and their data isn’t going to be much. Hence I want them to use the parent tables. I think that kinda structure works for me.

    Let me know if you have any clues on how to go about it.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Okay, you CAN do this with Multisite. I wouldn’t.

    But they’ll have one single type of structured data.

    That SCREAMS ‘Custom Post-Types’ to me. Lock ’em down per user, you can even map domains to them: http://wordpress.org/plugins/domain-mapping-system/

    These sites wont have users of their own, categories of their own and their data isn’t going to be much.

    You misunderstand what ‘user’ means in WordPress. Is someone going to log into the site and make a post? Yes? They’re the user.

    If you REALLY want NO user, then I have no idea what you’re trying to do anymore….

    Thread Starter iexperience

    (@iexperience)

    Thanks for this plugin…ill check it out.
    Oh sorry if I didn’t communicate ‘users’ properly. Yes users are people logging in and making a post. I meant I don’t want sub sites to have their own users tables. Their users should be stored in the wp_users table. But I guess thats how it happens already as I don’t see a wp_2_users

    Yes I have custom posts types. I have them mapped to users. But then I want something like
    parentsite.com displays all the posts
    parentsite.com/<user> or <user>.parentsite.com to displays only the posts administered by that specific user.
    I want to able to map this to any site. i.e. http://www.abc.com =><user>.parentsite.com and be able to apply any theme on those.

    here is what I was thinking, I will have the multisite architecture. Ill create new sub sites. When a new child site is created, a series of tables wp_2_posts, etc are created where 2 is subsite number. What I can do here is instead of using wp_2_posts, wp_2_postmeta, wp_2_term_taxonomy, wp_2_term, etc. etc. use the corresponding wp_posts, wp_postmeta, etc. So I’ll leave behind only the configuration tables – wp_2_options and delete all the rest of the tables.

    comments? could you help me with this?

    thanks
    Shikhar

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    You’re doing it the wrong way for how Multisite WANTS to work.

    This is the right way:

    Install http://wordpress.org/plugins/wordpress-mu-sitewide-tags/ to agregate posts from the ‘children’ sites.

    Your users go to user.domain.com and post.

    Their posts are pulled to domain.com as well, but link BACK to user.domain.com, thus not harming SEO.

    The part that’s hard is where you want to hamstring these users and not let them add new categories, tags, and what not. But you can google how to hide those.

    Thread Starter iexperience

    (@iexperience)

    Hi Ipstenu,
    I think ill go with your earlier suggestion of using domain-mapping-system plugin.
    I don’t want too many tables because they wont have much data in all the child sites. Hence I want that data to be in a single posts table.
    Also domain mapping system plugin gives the ability to create micro sites using custom templates, pages and sub-pages.
    I kinda like this approach better.

    Thanks

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    I don’t want too many tables because they wont have much data in all the child sites. Hence I want that data to be in a single posts table.

    There’s no different at all in the end if you have ONE DB table with 50 posts, or 50 tables with one post, in so far as how WP handles things.

    Honestly, if you WANT to use Multisite, then you’re going to have multiople posts tables, and just accept that. Otherwise, you’re really not doing it the multisite way, and you will spend more time wrestling with that than actually posting content πŸ™‚

    Thread Starter iexperience

    (@iexperience)

    Hello Mika,
    I followed your approach. But I’m stuck at a point
    So the situation is as follows
    1. My url is http://www.abc.com.
    2. I have a microsite http://www.abc.com/xyz and http://www.xyz.com is mapped to http://www.abc.com/xyz.
    3. Now I want a post say http://www.abc.com/postA to open with the domain xyz.com. So the url of the post as to be something like http://www.abc.com/xyz/postA. Hence both these urls
    http://www.abc.com/postA and http://www.abc.com/xyz/postA will correspond to the same post.
    How to I go about something like this ?

    Thanks for your help.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Advisor and Activist

    Now I want a post say http://www.abc.com/postA to open with the domain xyz.com.

    You know how earlier I said “if you WANT to use Multisite, then you’re going to have multiople posts tables, and just accept that”

    This is what I’m talking about. If you want a post on another site in the network, you post on the other site.

    Let me put it a different way. WordPress multisite is multiple separate sites. The content is separate, the data is separate. All you share is a common source-code base for plugins/themes/core and a common potential user base.

    Now that that’s out the way, the only way to do this is to include the content with a plugin like http://wordpress.org/plugins/post-content-shortcodes/ (there are others that do it similarly). This is NOT a great long term solution however, and it’s a terrible idea for your SEO to duplicate content in this way.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘customizing multisite using parent tables for posts, categories’ is closed to new replies.