admin管理员组文章数量:1191359
I have a server that uses themes from our private repository, and I'd like to auto enable the themes as soon as they exist in the wordpress themes folder.
Right now I have to login as administrator and enable the theme network-wide so the adminisrators can choose the theme.
Is there a way to configure wordpress network to AUTO enable the themes?
I have a server that uses themes from our private repository, and I'd like to auto enable the themes as soon as they exist in the wordpress themes folder.
Right now I have to login as administrator and enable the theme network-wide so the adminisrators can choose the theme.
Is there a way to configure wordpress network to AUTO enable the themes?
Share Improve this question asked Oct 14, 2017 at 14:26 TznTzn 31 bronze badge3 Answers
Reset to default 1Unfortunately, no. For something like that to work, WordPress (or some plugin to do that) would need to scan themes folder for changes, and that can be performance intensive operation. Maybe with some sort of scheduled scan running every few minutes.
I am not aware of any plugin that can do that.
If you are adding 3 new themes per week, you mean you just want them to be network activated automically? Use-WP-cli to install and activate them or deploy them from github.
You can override the WordPress default theme by editing your wp-config.php file. Just add the following code anywhere before the line where WordPress includes the wp-settings.php file.
Add this
1: define( 'WP_DEFAULT_THEME', 'your-default-theme' );
Before
2: require_once(ABSPATH . 'wp-settings.php');
So when you will create a new subsite in multisite, it will automatically enable the theme defined in WP-CONFIG file.
If theme is not availabe it will choose defauly twentyseventeen theme.
本文标签: Wordpress MultisiteAuto enable theme
版权声明:本文标题:Wordpress Multisite - Auto enable theme 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738447775a2087312.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论