WordPress.org

Ready to get started?Download WordPress

Forums

Can I change the path where the themes are? (6 posts)

  1. forteller
    Member
    Posted 8 years ago #

    Hi! I've got three blogs on two different subdomains. I'd like to be able to acces all of my themes on all of my blogs without having to upload all of them three times. Is it possible to tell WP that my themes are found in another directory than wp-content/themes/ so that I can have just one directory with all my themes accesible for all my blogs at the same time?

    Thanks a lot, and sorry about my english..! :)

  2. moshu
    Member
    Posted 8 years ago #

    No, I don't know of a solution for that.
    (your English is fine)

  3. schestowitz
    Member
    Posted 8 years ago #

    You can use symbolic (or more probably hard) links to 'fool' WordPress into thinking it has a copy of the themes in each blog directory, when in facts all point to a central themes repository. I suspect, however, that you will need shell access to your home directory to do this. It's not trivial. Best wishes... remember that themes are rather small in terms of size anyway. Duplication is not a major thing.

  4. forteller
    Member
    Posted 8 years ago #

    Ok, thank you for your fast and nice replys!
    I don't think I'll try to do that, schestowitz, as I don't even know what shell access is! :)

    If you have any influence on how WP develops, please remember that I'd like this to be implemented some time (if it's not very hard to do). It would make it easier for people like me that has to translate the skins.. :)

  5. moshu
    Member
    Posted 8 years ago #

    1. There is no "skin" in WP, just themes :)
    2. I don't see how your request is related to theme localization.

  6. Joshua Sigar
    Member
    Posted 8 years ago #

    There are the following functions in file functions.php

    function get_theme_root() {
    return apply_filters('theme_root', ABSPATH . "wp-content/themes");
    }

    function get_theme_root_uri() {
    return apply_filters('theme_root_uri', get_settings('siteurl') . "/wp-content/themes", get_settings('siteurl'));
    }

    That says that you can change the path to where WP should look for themes. Just create a plugin which utilizes filter 'theme_root' and 'theme_root_uri'.

Topic Closed

This topic has been closed to new replies.

About this Topic