WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

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 don't want to ask the user to install this and that plugin, I want my theme to be 100% active active without the need to install a plugin like wp-postviews plugin, so how can i do that. I want to include it directly in functions.php file? Thanks in advance.

share|improve this question

That was so easy! I just included the plugin folder in my theme Then i included it.

 include(your-theme-path . 'wp-postviews/wp-postviews.php');

That was it!

share|improve this answer

You could include the particular plugin in your theme directory and then fire a function on after_switch_theme:

add_action( 'after_switch_theme', 'fwp_theme_setup' );
function fwp_theme_setup(){ 

You should also take a look at after_setup_theme always runs

share|improve this answer
Thanks for taking the time, but it doesn't work, I found a solution though, you can find it in my answer below. – Rahman Sharif Feb 1 '13 at 22:35

Your Answer


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.