0

I am developing my own custom WordPress theme but in my custom theme i am using some of plugins. Actually i am adding some custom field plugin to customize the text on my theme. My problem is that when i install my theme in another WordPress website setup the errors occurs because plugins are not added. I want to know that how can i add or attach others plugins with my theme so that when i need to install my theme to another WordPress website setup these plugins should installed automatically.

Thanks in advance

1 Answer 1

0

You can use TGM Plugin Activation library to let the user know about required and recommended plguins that your theme depends on.

Automatically installing plugins is not a better choice instead let the users know that X plugin should be installed and activated in order for the theme to work properly.

If your theme requires a plugin without which it gives error then make sure to add checks for functions like so:

if(function_exists('xplugin_function')){
   //code
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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