2

I have defined in my config:

define( 'WP_CONTENT_DIR', dirname(__FILE__) . '/somedirectory' );

after Codex: Editing WP Config

BUT <?php echo get_template_directory_uri(); ?> prints out:

http://dev.domain.com/wp-content/themes/mytheme

Even though it should print out

http://dev.domain.com/somedirectory/themes/mytheme

Has anyone else experienced this or know of a fix?

  • 2
    As @user51755 said, you need to define WP_CONTENT_URL too :) – TheDeadMedic May 16 '14 at 15:12
3

This is how i set my content directory in wp-config.php

// ========================
// Custom Content Directory
// ========================
define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/somedir' );
define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/somedir' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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