Title: PHP on page
Last modified: August 18, 2016

---

# PHP on page

 *  [gigaset](https://wordpress.org/support/users/gigaset/)
 * (@gigaset)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/php-on-page/)
 * hey, how could I add some php code onto a specific page? I’ve tried to open an
   html-editor but additing a php code there do nothing.
 * Here’s my problem: i want to add php code for showing the future events that 
   i ‘ve added. I use calendar v 3.0
    so I create a page than i add a php-code and
   nothing happend…. can you help me? tnx

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

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/php-on-page/#post-456211)
 * No, you cannot add php code into the content area (aka Write Page).
    You can 
   do 2 things: create a Page template and put the code there, then create a new
   Page by using that template or, use a plugin that allows you to run PHP in the
   content. Search for runphp, phpexec, execphp and stuff like that.
 *  Thread Starter [gigaset](https://wordpress.org/support/users/gigaset/)
 * (@gigaset)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/php-on-page/#post-456347)
 * thank you, moshu 🙂
 *  [nely](https://wordpress.org/support/users/nely/)
 * (@nely)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/php-on-page/#post-456380)
 * 2 moshu
    could you explain in details what sould i do? i undertand that i must
   create a template. done. and what should i do next? how could i create a new 
   Page by using that template??
 *  [estjohn](https://wordpress.org/support/users/estjohn/)
 * (@estjohn)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/php-on-page/#post-456381)
 * add the php code into that template under the title of the page, then create 
   a new page and use that for the template.
 * for example:
    I used a template of page.php called it plugin.php
 * under title i added the php code i wanted to use
 * [code]
 * <h2><?php the_title(); ?></h2>
    <div id="plugins">
 * Plugins:
    <?php displayPluginsAsList(); ?> </div>
 * [/code]
 * saved it, then created a new page, left it blank and published it.
 * the result is:
 * [http://www.aleeya.net/credits/plugins/](http://www.aleeya.net/credits/plugins/)
 *  [nely](https://wordpress.org/support/users/nely/)
 * (@nely)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/php-on-page/#post-456384)
 * thanks…but i didn’t understand…
    look, I wan’t to use different from the whole
   template in my “myGallery”. I’d like to create a template page for my gallery
   that would differ from the template i have for my web-site, i don’t want to display
   some elements of design, for example heading. how could i perform my task? could
   i create just once a template and then use it several thousand times to add pages
   to my gallery using the tempalate different from the site-design? sorry for my
   english and non-concrete question, but i can’t explain in another words…
 *  [estjohn](https://wordpress.org/support/users/estjohn/)
 * (@estjohn)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/php-on-page/#post-456385)
 * that is exactly what you do. you create the template you want to use. you save
   that as a template page in your themes directory. then, when you make a pages,
   you use the new theme
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 8 months ago](https://wordpress.org/support/topic/php-on-page/#post-456386)
 * This might help:
    [http://codex.wordpress.org/Pages#Creating_your_own_Page_Templates](http://codex.wordpress.org/Pages#Creating_your_own_Page_Templates)
 *  [oncidium](https://wordpress.org/support/users/oncidium/)
 * (@oncidium)
 * [19 years, 2 months ago](https://wordpress.org/support/topic/php-on-page/#post-456431)
 * I’m trying to do something similar…include a gallery within a page. I got the
   php to run on the page, see here: [http://www.divaknitting.com/blog/?page_id=334](http://www.divaknitting.com/blog/?page_id=334)
   but the problem comes when you try to click on a category. I got the page to 
   show up by putting view.php in the blog directory but now I am at a loss as to
   how to get the blog to appear around it as you drill down to single pics. Any
   ideas?

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

The topic ‘PHP on page’ is closed to new replies.

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 8 replies
 * 6 participants
 * Last reply from: [oncidium](https://wordpress.org/support/users/oncidium/)
 * Last activity: [19 years, 2 months ago](https://wordpress.org/support/topic/php-on-page/#post-456431)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
