• I’ve searched high-and-low and haven’t found a solution for this, so I throw this to the WP community…

    I have a client who wants a separate subdomain for an “iPhone-only” site, so iphone.domain.com. We have a beautifully working WP site already. The subdomain should pull from the same database as the main “www” site. The https://www.domain.com WP files are in a /www directory, but the iphone files are in the /subdomains/iphone/www directory.

    I want to pull the last 5 general posts, plus n number of posts from a specific category, but the real question is can I use the same content across subdomains on the same site and how?

    Yes, I know it would be easier to create an iPhone Theme and use a automagic theme-switcher, but this is what the client wants.

    Thanks in advance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ericksonstudio

    (@ericksonstudio)

    Anyone? Help?

    I believe the only way to do this would be to have an installation of wordpress in a subfolder of the root. that way it can address the files of the original. If it is in a seperate folder there is not a way to map it correctly.

    I have a limited knowledge of this stuff…so I may be incorrect.

    Why not do https://www.domain.com/iphone??

    Thread Starter ericksonstudio

    (@ericksonstudio)

    Why not do https://www.domain.com/iphone??

    The simple answer is the client doesn’t want it.

    Thanks for the idea. I think I tried that already, but I’ll give it another shot.

    Anyone else have some experience with this?

    Okay this is not going to be easy but is possiable.

    The page mist be a php page, if you place
    <?php require('../wp-blog-header.php'); ?>
    at the top of the page and point it to the wp-install you can then place the wp code for “The Loop” in the page.

    It will output the same CSS tags as the wordpress install. Hope this leads you in the right direction. I use it to use the wp-theme on non wordpress pages.

    Thread Starter ericksonstudio

    (@ericksonstudio)

    Well, that didn’t work (using the wp-blog-header.php file). It looks like the server won’t let me include anything from the /www directory — not even a plain txt file.

    Maybe a permissions issue?

    i am interested in the same end result as ericksonstudio has requested help on. i have a feeling a lot of ipod touch/iphone owners who also own their own domain and use wordpress to blog would also like to make this happen. currently, the only other solution is to run a separate iphone-formatted theme via a plugin, BUT this does NOT work if you use wp-cache or the like.

    is it possible, albeit cumbersome, to do a second wp install in the subdomain and “republish” or syndicate (rss) the latest 20 or so posts in the second install of the i-site?

    either way, if anyone can help us solve this very desirable result, it would be greatly appreciated!

    https://www.boilr.net

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Subdomain with Same Database Content?’ is closed to new replies.