Home > CMS Tutorial > WordPress > How to customize WordPress file upload path

How to customize WordPress file upload path

藏色散人
Release: 2019-12-21 13:32:13
forward
3059 people have browsed it

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!

How to customize WordPress file upload path

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');
}
Copy after login

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

How to 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!

Related labels:
source:zmingcx.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template