Wordpress: wp-content folder separated from the rest

后端 未结 1 1270
野趣味
野趣味 2021-01-26 11:40

I need to move my wp-content folder in another folder.

For example, this is the wordpress folder:

  • \"wp-admin\" folder
  • \"public\" folder (inside th
相关标签:
1条回答
  • 2021-01-26 12:05

    If the content is shown, that implies that the definitions you have added to wp-config.php are working properly.

    Incorrect styling implies that there is a hard-coded path within your theme files. For example, the theme creator used:

    // Incorrect 
    echo '/wp-content/themes/themename/css/stylesheet.css';
    

    Instead of...

    // Correct 
    echo get_stylesheet_directory_uri() . '/css/stylesheet.css';
    

    Or even an incorrect call to content_url.

    You'll need to find these hard-coded URLs/paths, and update them to the correct format.

    0 讨论(0)
提交回复
热议问题