I am developing a plugin wherein i want to make a /CSS/ directory in the currently activated theme.
using get_template_directory_uri()
not working because its https:// path. I want an Absolute directory for making dir.
Here is code i am using:
$directoryName = ''.get_template_directory_uri() .'/css/';
if(!is_dir($directoryName)){
mkdir($directoryName, 0755, true);
}
To get the path on the file system, you need to use:
get_template_directory()
instead of:
get_template_directory_uri()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.