Title: Adding PHP code to &#8220;Pages&#8221;
Last modified: August 18, 2016

---

# Adding PHP code to “Pages”

 *  [fx3000](https://wordpress.org/support/users/fx3000/)
 * (@fx3000)
 * [20 years ago](https://wordpress.org/support/topic/adding-php-code-to-pages/)
 * What do you have to do to add PHP code or reuse existing WordPress PHP code on
   the static “Pages”? For example, WordPress starts out with one static page, called“
   About”. If you try to add some PHP code like <?php echo ‘Hello World’; ?> it 
   does not work and is wiped out.
 * Sorry if this is a super-noob question. I am a recent refugee from Movable Type
   and just getting to understand how I can make WordPress look like my existing
   site.

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

 *  [resiny](https://wordpress.org/support/users/resiny/)
 * (@resiny)
 * [20 years ago](https://wordpress.org/support/topic/adding-php-code-to-pages/#post-384953)
 * you need to either make a page template with the php you want in it, or you need
   to get a plugin whose name I can’t remember that lets you do that
 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [20 years ago](https://wordpress.org/support/topic/adding-php-code-to-pages/#post-384955)
 * Right, as Resiny notes, the easiest way to go about this (err, imho) is via some
   Page Templates that already include the PHP bits you want. Just name each page
   template something clever so that you’ll remember what it is up to. Then, when
   creating a new Page in WP, select the appropriate template.
 * more on that here: [http://codex.wordpress.org/Pages](http://codex.wordpress.org/Pages)

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

The topic ‘Adding PHP code to “Pages”’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [Chris_K](https://wordpress.org/support/users/handysolo/)
 * Last activity: [20 years ago](https://wordpress.org/support/topic/adding-php-code-to-pages/#post-384955)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
