Title: PHP include in Plugin function
Last modified: August 21, 2016

---

# PHP include in Plugin function

 *  Resolved [GenericBox](https://wordpress.org/support/users/genericbox/)
 * (@genericbox)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/php-include-in-plugin-function/)
 * I am creating a plugin and want to include my options pages, however when calling
   my function the option page remains blank regardless of the content I put into
   the included PHP page.
 * Is there a known issue with includes from a plugin function? or if not, I will
   triple-check my options.php code again.
 * Thanks.
    GB.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [GenericBox](https://wordpress.org/support/users/genericbox/)
 * (@genericbox)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/php-include-in-plugin-function/#post-3860338)
 *     ```
       function jpvg_options_screen(){
       	include(plugins_url('options.php', __FILE__));
       }
       ```
   
 *  Thread Starter [GenericBox](https://wordpress.org/support/users/genericbox/)
 * (@genericbox)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/php-include-in-plugin-function/#post-3860360)
 * Found the issue, WordPress doesn’t like it when you link to the full address 
   of a file from within a plugin, instead, using the relative path works.
 * However, I had to change my file names to more ..unique.. filenames as they were
   causing conflicts.
 * So, this works:
 *     ```
       function jpvg_options_screen(){
           include('jpvg_options.php');
       }
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP include in Plugin function’ is closed to new replies.

## Tags

 * [function](https://wordpress.org/support/topic-tag/function/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [GenericBox](https://wordpress.org/support/users/genericbox/)
 * Last activity: [12 years, 9 months ago](https://wordpress.org/support/topic/php-include-in-plugin-function/#post-3860360)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
