The following column WordPress Tutorial will introduce you to the method of customizing the WordPress file upload path. I hope it will be helpful to friends in need!
Since WordPress version 3.5, the "Default upload path and full URL address of the file" option on the background media settings page has been hidden. This option can be adjusted through the following code come out.
Add the following code to the current theme functions.php file to call up this option:
if(get_option('upload_path')=='wp-content/uploads' || get_option('upload_path')==null) { update_option('upload_path',WP_CONTENT_DIR.'/uploads'); }
Note: This code can be deleted after use and does not need to be retained in the theme.
Or install the 030 Ps Display Upload_path For WP3.5 plug-in.
Customize WordPress file upload path
For more WordPress related technical articles, please visit the WordPress tutorial column: https ://www.php.cn/cms/wordpress/
The above is the detailed content of How to customize WordPress file upload path. For more information, please follow other related articles on the PHP Chinese website!