WordPress.org

Ready to get started?Download WordPress

Forums

Remote themes? (6 posts)

  1. Kiddeath91
    Member
    Posted 8 years ago #

    I'm sure it can be done so here goes:

    Trying to host one theme for two WP installs. Wanting/needing to only have one set of theme files to edit (for obvious reasons). I can get around rerouting the css to the master css file with an at import rule. But what about the php theme files. How do you call templates out of a different install.

    In other words, how do you define an absolute url location that is outside of the install in this line of example line of code:

    <?php include (TEMPLATEPATH . '/header.php'); ?>

    I've tried <?php include (TEMPLATEPATH . 'http://mysite.com/wp-content/themes/header.php'); ?> and it doesn't work.

    Thanks in advance for help you php gurus.

  2. Joshua Sigar
    Member
    Posted 8 years ago #

    How 'bout this
    <?php include ( 'http://mysite.com/wp-content/themes/header.php' ); ?>

    Some hosts prohibit including files thru "http://", btw. So might want to use something like the following.

    <?php include ( /home/username/wp-content/themes/header.php' ); ?>

    There's a plugin in this topic, I believe.

  3. Joshua Sigar
    Member
    Posted 8 years ago #

    Here, check out the following. I never used it, though.
    http://scott.sauyet.com/php/wp-plugins/stylesheets/

  4. Kiddeath91
    Member
    Posted 8 years ago #

    alphaoide
    I can't get that to work either.

  5. Kiddeath91
    Member
    Posted 8 years ago #

    thanks alphaoide. I'll try to find a plugin or get the path right. If someone knows about a plugin, kindly post its whereabouts.

  6. There is a possibility that your host will not allow you to open PHP files outside of your domain. If that is true, then it shouldn't be too hard to change a theme file on site A, then delete/replace the same file on site B with the new one from site A.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags