Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a working plugin with many functions in it. I want to break the plugin into several file. I removed some functions and place it in a file called activate.php k7Course.php. Then in the file k7Couses.php i include as below:

/*
Plugin Name: k7 Course Management
Plugin URI: http://yourdomain.com/
Description: A plugin to manage k7 Courses Display
Version: 1.0
Author: Noor
Author URI: http://yourdomain.com
License: GPL
*/

require_once('activate.php');

The problem is that the code in activate.php in being included but as raw text because i see all the content of activate.php in the admin menu. Also the function are not being executed

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

It sounds as though your include file activate.php does not have the opening/closing php tags. Be sure to open activate.php and ensure it has the <?php at the beginning of the file, and the ?> at the end.

share|improve this answer
    
you were, I just took the functions and paste it there, stupid error :( –  Noor Apr 19 '12 at 12:56
add comment

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.