Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

By defining TEMPLATEPATH, STYLESHEETPATH, WP_CONTENT_DIR and WP_CONTENT_URL merely affect the naming changes to wp-content.

Is there any way to redefine the theme path and plugin path, so the new path can propagate through function calls such as get_options or bloginfo?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

For themes you can use register_theme_directory() function to add additional directories for WP to be aware of. I don't think I ever seen this used in practice, so not sure if there are any complications possible.

For plugins you can define WP_PLUGIN_DIR and WP_PLUGIN_URL constants in wp-config.php.

share|improve this answer
    
register_theme_directory() it is. Thank you. –  Sean Lee Aug 14 '11 at 20:18

You can change the wp-content folder which changes the plugin and theme dir. To do this you put change the folder location and put these two lines in your wp-config.php file:

define ('WP_CONTENT_DIR','/full/path/to/your/content/dir');
define ('WP_CONTENT_URL','http://example.com/full/path/to/your/content/dirs/url');

Just be aware that some plugins and themes are badly coded and may break because they are hard coded to look at the wp-content dir.

share|improve this answer
    
Thanks for trying, but my question was on how to continue using get_bloginfo and get_option after switching theme directory. –  Sean Lee Aug 14 '11 at 20:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.