logo-top

How to set some required & recommended plugins into a WordPress Theme?

December 8th, 2017 /

By using TGM Plugin Activation we can set some required & recommended external plugins. We can call some plugins from wordpress.org plugin repository or we can call some plugins from our theme folder. Also, it can help us to call plugins from external sources.

To use this you need 2 files.

  1. class-tgm-plugin-activation.php
  2. example.php

After downloading the theme you will get “class-tgm-plugin-activation.php” and “example.php”. Now you have to rename the file from example.php to tgm.php or whatever you want.

Now include the tgm.php in your theme function.  After that, you can see some array in your tgm.php. You can change those as per your requirement.  Before doing this please make sure that you are using right path for this 2 files.

WhatsApp chat