Title: Calling external PHP script from within WP
Last modified: August 18, 2016

---

# Calling external PHP script from within WP

 *  [hooopla](https://wordpress.org/support/users/hooopla/)
 * (@hooopla)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/calling-external-php-script-from-within-wp/)
 * This is a really basic PHP question: what is the syntax for calling an external
   script from within a WP template?
 * I’d like to integrate phpMyQuote with the rest of my site, but I’m not sure how.
 * Many thanks.

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

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/calling-external-php-script-from-within-wp/#post-193442)
 * I am calling my horizontal menu like this:
    `<?php include (TEMPLATEPATH . '/
   horizontal.php'); ?>` and the searchform in a similar way: `<?php include (TEMPLATEPATH.'/
   searchform.php'); ?>` …provided the files are in the theme directory.
 *  Thread Starter [hooopla](https://wordpress.org/support/users/hooopla/)
 * (@hooopla)
 * [21 years, 1 month ago](https://wordpress.org/support/topic/calling-external-php-script-from-within-wp/#post-193443)
 * Thank you, moshu. I’ll give it a shot.
 *  [clfarris](https://wordpress.org/support/users/clfarris/)
 * (@clfarris)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/calling-external-php-script-from-within-wp/#post-194270)
 * I’m trying this, where exactly do I put this code? In the main template page 
   code? Or in my page contents?
 * I am trying to insert a form, to submit commits directly, via email!
 *  [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * (@kafkaesqui)
 * [20 years, 11 months ago](https://wordpress.org/support/topic/calling-external-php-script-from-within-wp/#post-194271)
 * clfarris, it would depend on where you want to display it. If it’s on a Page (
   as in Write > Pages), you could create a Page template and add the code to it(
   or you can include the php file). Then assign the template to your Page by editing
   the Page and selecting the template from the Page Template dropdown. Look at 
   the template info on the Codex page covering Pages:
 * [http://codex.wordpress.org/Pages](http://codex.wordpress.org/Pages)
 * Google cache of page above:
    [http://72.14.207.104/search?q=cache:Z_tEo1pA4fQJ:codex.wordpress.org/Pages](http://72.14.207.104/search?q=cache:Z_tEo1pA4fQJ:codex.wordpress.org/Pages)

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

The topic ‘Calling external PHP script from within WP’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 4 participants
 * Last reply from: [Kafkaesqui](https://wordpress.org/support/users/kafkaesqui/)
 * Last activity: [20 years, 11 months ago](https://wordpress.org/support/topic/calling-external-php-script-from-within-wp/#post-194271)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
