WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to include a file from plugin Folder in my template file. How can I do that? Is there any other way to do that rather than:

include('../../..');

Thanks

share|improve this question
up vote 2 down vote accepted

plugins_url( 'file_location/relative_to.plugin', 'plugin/file/location' );, or something along those lines at least, should do it for you. Alternatively, you could work from the top down and say something like include( '/wp-content/plugins/you-plugin-name/file.php' ) to get it, whichever is easier.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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