• Bea Cabrera

    (@bea-cabrera)


    Hello all.

    I’m a new registered user but I’ve been reading and learning from this WordPress Support Forum for some time now. Thank you for that.

    This time I have to reach out for some help myself because I haven’t found anything addressing my problem.

    PROBLEM:
    I’ve drawn a graphic to illustrate what I would like to accomplish:
    https://www.beacabrera.es/webproblem.jpg

    As you can see, I would like two domains to look like totally different pages from a visitor’s pont of view, but share a common WordPress Installation (author’s point of view). What’s most important is that both different domains should share part of the content.

    (NOT?) POSSIBLE SOLUTIONS

    – I’ve already been prompted with a WordPress MU installation, but in that case content is not shared and the same theme would be installed in both blogs (being able only to change the CSS through a plugin).
    – I’ve also been told about a plugin that switches templates but I don’t know about this, and I would like to avoid the use of plugins if possible.
    – I’ve been thinking about creating a custom template with a loop that filters by category. That would be fine for the “home” of domainTWO.com but, what about all other links to other “categories”? They would revert to the base index template if I don’t create a template for each of them too… this is getting too fussy.

    QUESTION
    Does anyone know how to address this problem? Have you tried it yourself? Is there something in WordPress codex that I’m missing?

    Thank you in advanced!
    Bea.

Viewing 12 replies - 1 through 12 (of 12 total)
  • You can create a script in the domain one that create a JSON, XML or other format and the domain two access this information.

    Thread Starter Bea Cabrera

    (@bea-cabrera)

    …mmm not sure what you mean.

    Do you mean a script with something like:
    if ($_SERVER[‘HTTP_HOST’] == ‘yoursite.com’) … blablabla … ?

    If I place a script like that, that would conditionally jump to a new template, I’m not sure how to handle WordPress’s theme structure. I’ll look into this.

    Yes. You can accept only request of the domain two.

    Thread Starter Bea Cabrera

    (@bea-cabrera)

    edpittol, what do you actually mean? I don’t understand.

    I mean, if I have a script with a conditional loop I can load one template on the ‘if’ sentence and another on the ‘else’ declaration.

    If I were to do something like this I would place the conditional sentence in my index.php and then load one header.php or another.

    Is this what you mean?

    Rachel Baker

    (@rachelbaker)

    @bea,

    Just a thought, but why not have all of the authors post to siteA and run some sort of migration script to move the content to siteB?

    There hurdles with things like comments, etc but that would be the approach I would take.

    Thread Starter Bea Cabrera

    (@bea-cabrera)

    migration script… like pushing content from one to the other.
    That could be a possibility. Do you know of any plugins?

    I’ll google about it.

    Thanks.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Do the visitors on blue & pink need to stay on b&p or can they be directed to pink?

    Becuase with WordPress Multisite, you can totally do this by having this plugin pull posts from sites into one site: https://www.ads-software.com/extend/plugins/wordpress-mu-sitewide-tags/

    Basically you’d have two sites on the network, blue (your tags blog) and pink. Post blue on blue, and it stays there. Post pink and blue automatically gets a post from pink. The catch is if you click on the link to read the pink post, it sends you to the pink site.

    But if that’s okay, it’s the most SEO friendly way about it.

    Thread Starter Bea Cabrera

    (@bea-cabrera)

    I’ve been looking into the option of pushing content, but isn’t that anti-SEO? In the end they’ll all be duplicates.

    I’ve also been trying the possibility of styling a category-id.php. I though: “dough! I had overseen the easiest solution!“… but then I realised that when clicking through, the permanent link of the post will be styled back to its origins (which is what you say is good about having the content pushed to another actual blog in a Multisite Network, that it will keep its own layout).

    So… I came up with the idea of inserting a conditional tag when you called to the single.php. Something like: if (is_single() && belongs to the category Pink) then load some other single template.

    I think I could actually get around it and seamlessly for the end user, without having to duplicate content. I’m still working on this, I’ll let you know.

    Still many thanks for your inputs! I’ve been able to think this through many different angles. Any more suggestions are welcomed!

    Thread Starter Bea Cabrera

    (@bea-cabrera)

    [ Moderator note: topic fixed, please continue to stay on point. If someone is rude just tag the topic with modlook and it will get looked at. If someone is rude please do not take the bait. ]

    Back to the case:
    Thanks for the definition, I’m sorry you interpreted that way, but I believe it is clear now what happened ;).

    I’ve been looking into pushing content from one site to another, but it is totally anti SEO because of duplicates. There are ways of reducing this effect, like the meta tag:
    <meta name=”original-source” content=”URL”>
    but (there’s always a but) my site B would not only receive content my site A, it could also generate its own, so with this meta tag we would be killing all its SEO :(.

    WP multi-sites is also not what I’m looking for because all blogs share the same theme (option to change css only) and, what’s most important, content is not shared between blogs in the network.

    Thanks for attending this thread even though the last comment you read from me was totally out of bounds.

    Cheers!

    gjeeter

    (@gjeeter)

    I may be over looking something? But why not have one database and two wp site simply pull content from the db? When you post on one or add something to one it goes into the db and the other site uses the same db so it will display all the same content?

    Wouldn’t that be two sites, one db, two themes?

    Surely you could install WP on one site and set it up. Then put the WP files on the server of the other site and set it to use the all ready created DB?

    Thread Starter Bea Cabrera

    (@bea-cabrera)

    @gjeeter, you mean to have one same config.php for two different wordpress installations? Which means sharing the same database…

    I thought of that on the beginning, but I was told that the database could fall into inconsistencies if they are being accessed at the same time. I’m not sure about this, have you tried it out?

    gjeeter

    (@gjeeter)

    No, I haven’t.

    Try mirroring databases.

    Maybe have two databases that mirror each other. Like a back up. When something is added to one it gets added to the other, and so on?

    But I’ve never tried that either.

    https://support.indichosts.net/helpdesk/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=249

    https://stackoverflow.com/questions/839265/how-to-mirror-a-mysql-database-using-just-one-server

    https://dev.mysql.com/doc/refman/5.5/en/replication.html

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘One database, two different layouts.’ is closed to new replies.