Title: script path inside post or page
Last modified: August 19, 2016

---

# script path inside post or page

 *  [waveminded](https://wordpress.org/support/users/waveminded/)
 * (@waveminded)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/script-path-inside-post-or-page/)
 * On one of my static WP pages I want to include a file, code:
    <?php include(‘
   info.php’) ?>
 * I have scripts working in posts, the problem is I can’t figure out the path its
   supposed to be. Right now the info.php file resides in my theme directory, should
   it be somewhere else?

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

 *  [danielerossi](https://wordpress.org/support/users/danielerossi/)
 * (@danielerossi)
 * [18 years ago](https://wordpress.org/support/topic/script-path-inside-post-or-page/#post-688882)
 * Anyone? I’m having the same problem. I have a php file in my theme folder and
   would like to insert an include tag on a page to access it.
 * I’ve tried all sorts of paths :
    <?php include (TEMPLATEPATH . ‘/header2.php’);?
   > <?php include (‘header2.php’); ?> <?php include (‘../header2.php’); ?> <?php
   include (‘../../header2.php’); ?> <?php include (‘../../../header2.php’); ?>
 * …but nothing is dsiplayed. What is the proper path? Can WordPress (2.5.) even
   do this? I’ve done a search on these forums and it seems that no solution has
   been posted.
 *  [haochi](https://wordpress.org/support/users/haochi/)
 * (@haochi)
 * [18 years ago](https://wordpress.org/support/topic/script-path-inside-post-or-page/#post-688883)
 * WordPress doesn’t do that out of box, but plugins do.
    [http://wordpress.org/extend/plugins/exec-php/](http://wordpress.org/extend/plugins/exec-php/)
 * I believe that’s what you want to do.

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

The topic ‘script path inside post or page’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [haochi](https://wordpress.org/support/users/haochi/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/script-path-inside-post-or-page/#post-688883)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
