admin管理员组文章数量:1424963
I'm developing my own Wordpress theme that I'm going to use for multiple clients. It has a Theme Options-page so I can easily customize the website every time, but I will also be using some plugins on every website I make (like an SEO-plugin, security, ...).
Is there a way to make them 'required' so I get a list of these plugins so I don't have to go find them in the plugins directory when I install the theme on a new website?
I'm developing my own Wordpress theme that I'm going to use for multiple clients. It has a Theme Options-page so I can easily customize the website every time, but I will also be using some plugins on every website I make (like an SEO-plugin, security, ...).
Is there a way to make them 'required' so I get a list of these plugins so I don't have to go find them in the plugins directory when I install the theme on a new website?
Share Improve this question asked Jun 4, 2019 at 10:02 Thessa VerbruggenThessa Verbruggen 2452 silver badges10 bronze badges 3- 2 You can use TGM Plugin Activation to list your theme's required plugins. tgmpluginactivation – Bhupen Commented Jun 4, 2019 at 10:08
- 2 Why not use a repository like github or bitbucket to hold all of the common files and just clone into the new site? – disinfor Commented Jun 4, 2019 at 17:06
- That's an option too, but i'd rather download the newest version of the plugins right away. But thanks voor the solution! – Thessa Verbruggen Commented Jun 5, 2019 at 7:25
1 Answer
Reset to default 10One way is to use TGM, as Bhupen already mentioned.
But if you want to do it in a cleaner, more "wordpressy" way, then you can:
1. Use, but don't require
You can write your theme in such way, that it doesn't require given plugins, but it uses them if they're available.
Good example of such approach is usage of WP-PageNavi plugin. You can check if this plugin is available and use it for pagination. But if it's not available, you can use native WP functions.
This way you give your user choice if he want's to use given plugin. Sometimes it's very important due to some conflicts, and so on.
2. Notify admin which plugins are recommended
And if you want to make it easier for you/user to install all recommended plugins, you can add some admin notice that will contain a list of recommended plugins. But please remember to allow to hide such notice.
本文标签: theme developmentCan I make plugins required
版权声明:本文标题:theme development - Can I make plugins required? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745439431a2658378.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论