Is it possible to rename the wp-content folder dynamically? I am building a custom framework to use on themes and it would be nice to set it up where it does everything on its own.
I am using this following code right now in wp-config
define ('WP_CONTENT_DIR','/name_of_new_folder');
define('WP_CONTENT_URL','http://example.com/name_of_new_folder');
Can I pull the site domain through dynamically with PHP?
Don’t do what seems to be possible…
You can use the possibility to change the WordPress constants
WP_CONTENT_DIR
andWP_CONTENT_URL
in yourwp-config.php
.Why? not recommended??
It’s pretty easy: Just do a cross file search (with your IDE or for e.g. Notepad++) for
wp-content
and you’ll find it hardcoded it many places. Some of the stuff will still work, but some wont. Yeah, I’ve already tried that.Figured it out!