php - I moved wp-content in a new folder. Now the themes don't work. Why? -
php - I moved wp-content in a new folder. Now the themes don't work. Why? -
this question exact duplicate of:
wordpress: wp-content folder separated rest 1 replyi had move wp-content folder in folder. while before there was:
wp-content wp-admin wp-include other filesnow there is:
myfolder (where there wp-content) wp-admin wp-include other filesi did , edited wp_content_dir , wp_content_url new directory, this:
define( 'wp_content_dir', dirname(__file__) . '/myfolder/wp-content' ); define( 'wp_content_url', 'http://example/myfolder/wp-content' ); i edited in wp-includes - default-constants.php this:
if ( !defined('wp_content_dir') ) define( 'wp_content_dir', abspath . 'public/wp-content' ); if ( !defined('wp_content_url') ) define( 'wp_content_url', get_option('siteurl') . '/public/wp-content'); now, contents shown, themes don't work well. colors wrong, lot of things aren't @ places, excetera... when wp-content in same directory wp-admin , wp-include worked perfectly. why not now?
if content shown, implies definitions have added wp-config.php working properly.
incorrect styling implies there hard-coded path within theme files. example, theme creator used:
// wrong echo '/wp-content/themes/themename/css/stylesheet.css'; instead of...
// right echo get_stylesheet_directory_uri() . '/css/stylesheet.css'; or wrong phone call content_url.
you'll need find these hard-coded urls/paths, , update them right format.
php wordpress
Comments
Post a Comment