Title: Using PHP GET with custom template
Last modified: August 18, 2016

---

# Using PHP GET with custom template

 *  [glidez](https://wordpress.org/support/users/glidez/)
 * (@glidez)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/using-php-get-with-custom-template/)
 * I created a new template so I can add my own PHP script but the script uses the
   html submit button with the PHP GET method and I dont have a php page to direct
   it to. When I load the page with the new template all I see in the URL is the
   directory name and no php page.. yet the directory does not exist when I connect
   to my server via FTP. Does wordpress dynamically link the url with the directory
   name to a php page? How does that work? How could I get around this, if I want
   to use GET?

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

 *  [makebbekus](https://wordpress.org/support/users/makebbekus/)
 * (@makebbekus)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/using-php-get-with-custom-template/#post-498560)
 * I’m having a similar issue, but haven’t found a solution yet. I’ve created a 
   WordPress Page called ‘Photography’ that uses a template file I have written.
   The template file (php) brings in one my flickr set based on the get value. e.
   g. photography.php?s=456487984654. But because the Page address is [http://mysite.com/photography](http://mysite.com/photography)
   there is no .php file to amend it to. If I try directly sending it to photography.
   php I get defaulted to my WP search results page with no results.
 * Anyone figured out to use the GET method with Pages?
 *  [Mark Jaquith](https://wordpress.org/support/users/markjaquith/)
 * (@markjaquith)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/using-php-get-with-custom-template/#post-498561)
 * WordPress’ pages (and any of its URLs that don’t contain `.php`) are virtual…
   they don’t correspond to physical directories.
 * You should be able to append `?get=foo` to a WordPress page URL and then access`
   $_GET['foo']` within your custom page template.
 * Note that `s` is used by WordPress for WP searches, so you’ll want to choose 
   something else like `?flickrsearch=X`
 *  [makebbekus](https://wordpress.org/support/users/makebbekus/)
 * (@makebbekus)
 * [19 years, 3 months ago](https://wordpress.org/support/topic/using-php-get-with-custom-template/#post-498562)
 * Thanks markjaquith! As soon as I changed the variable name everything started
   working as expected. To finish my example from above for anyone else having issues,
   the working address looks like this:
 * [http://mysite.com/photography/?set=234234234](http://mysite.com/photography/?set=234234234)

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

The topic ‘Using PHP GET with custom template’ is closed to new replies.

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [get](https://wordpress.org/support/topic-tag/get/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [WPadvanced](https://wordpress.org/support/topic-tag/wpadvanced/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [makebbekus](https://wordpress.org/support/users/makebbekus/)
 * Last activity: [19 years, 3 months ago](https://wordpress.org/support/topic/using-php-get-with-custom-template/#post-498562)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
