Is it possible to move theme to root? (4 posts)

  1. Is it posisble to move the theme files from /wp-content/themes/name_of_theme/ to server root, at the same level as all the wp-* files?

    I use one theme (and it won't change) for a large, reasonably static site, and aesthetically I'd like the index, header, etc., files in root. I'm deleting all RSS and commenting files, too, so root won't be crowded :)

  2. fitztrev
    Posted 7 years ago #

    Why care? It doesn't change anything for your visitors.

    It sounds like a lot of work and will make upgrading a hassle.

  3. jmkprime
    Posted 7 years ago #

    I have the same issue - WP embedded within a larger site - but haven't resolved it yet.

    I suspect it may be possible to use symbolic links so that the files are linked to different locations.

  4. Ryan Hellyer
    Posted 7 years ago #

    I suspect you don't actually want to move all your theme files to the root as I can't think of any possible reason why you would want to do that.

    I assume what you actually want to do is use images, style sheets etc. from your root directory, so can't be located in the WordPress URL. This is quite easy, just specify their locations absolutely in your theme.

    ie: instead of:
    <link src="<?php bloginfo('template_url'); ?>/style.css" media="display" />

    you would have:

    <link src="<?php bloginfo('wpurl'); ?>/style.css" media="display" />

    or (where domain.com is YOUR domain):

    <link src="http://domain.com/style.css" media="display" />

Topic Closed

This topic has been closed to new replies.

About this Topic