I wanted a plugin like meta slider to include in my theme folder. how can i do that?. The plugin will be always there for using from wordpress dashboard admin panel

  • So each time the real plugin is updated, you are forced to update your theme as well? – fuxia Nov 30 '16 at 13:21
  • no, the plugin will be always there in theme folder – nriddhi Nov 30 '16 at 13:23
  • 1
    It's not a great idea to have the code in your theme, for the reason toscho mentioned and others. If it's that you want the theme to force the admin to have that plugin, you can write some code to make a plugin 'required' and not allow the theme to be used without it. If this meets your needs then check this out - tgmpluginactivation.com – Dan. Nov 30 '16 at 13:26
  • Are you going to create it yourself? You don't have to create a plugin in the plugins folder, but it is recommended. You can write the code in your functions.php file. – ideapro Nov 30 '16 at 13:27

It isn't good idea to include some plugins directly in your theme, because you loose oportunity to update plugin etc. If you do so manually and update whole theme you can try to put folder with plugin eg. my-plugin in your themes root directory and in functions.php just include main my-plugin.php (folder name and main php file always have the same name). It may be good idea if you develop your own plugin for theme and update whole theme if you do changes.

| improve this answer | |
  • 1
    there are most likely also be collisions in sites on which the plugin is already installed – Mark Kaplun Dec 1 '16 at 7:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.