I have a must use plugin that uses register_theme_directory() but no matter what path I pass in, it always returns false.
For some background I am using domain based database switching in the wp-config to manage multiple distinct sites with one install, (i am not using a network install because each site needs it own unique users database). I have some themes I want to only be available to one specific site, so I put it in a special directory and try to register the theme directory in a mu-plugin if the domain is accessed.
Here is the relevant portion of my directory-structure:
wp-content
|-> site-themes
|-> site-a
|-> theme-1
|-> theme-2
I have tried the following:
if ( [check site domain ] ) {
register_theme_directory( '[wordpress root]/wp-content/site-themes/site-a' );
}
When that didn't work I figured it must need each theme to have its directory registered so I tried this:
if ( [check site domain ] ) {
register_theme_directory( '[wordpress root]/wp-content/site-themes/site-a/theme-1' );
register_theme_directory( '[wordpress root]/wp-content/site-themes/site-a/theme-2' );
}
But that didn't work either. I am sure I am missing something simple. Any suggestions?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745277340a4620116.html
评论列表(0条)