WordPress.org

Ready to get started?Download WordPress

Forums

One database, two different layouts. (13 posts)

  1. Bea Cabrera
    Member
    Posted 1 year ago #

    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:
    http://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.

  2. edpittol
    Member
    Posted 1 year ago #

    You can create a script in the domain one that create a JSON, XML or other format and the domain two access this information.

  3. Bea Cabrera
    Member
    Posted 1 year ago #

    ...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.

  4. edpittol
    Member
    Posted 1 year ago #

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

  5. Bea Cabrera
    Member
    Posted 1 year ago #

    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?

  6. rachelbaker
    Member
    Posted 1 year ago #

    @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.

  7. Bea Cabrera
    Member
    Posted 1 year ago #

    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.

  8. 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: http://wordpress.org/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.

  9. Bea Cabrera
    Member
    Posted 1 year ago #

    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!

  10. Bea Cabrera
    Member
    Posted 1 year ago #

    [ 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!

  11. gjeeter
    Member
    Posted 1 year ago #

    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?

  12. Bea Cabrera
    Member
    Posted 1 year ago #

    @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?

  13. gjeeter
    Member
    Posted 1 year ago #

    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.

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

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

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

Topic Closed

This topic has been closed to new replies.

About this Topic