Title: Write to php code
Last modified: August 20, 2016

---

# Write to php code

 *  [anandselvaraj](https://wordpress.org/support/users/anandselvaraj/)
 * (@anandselvaraj)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/write-to-php-code/)
 * Hi All,
 *  How to write a php code in pages editor. Please share me…

Viewing 1 replies (of 1 total)

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [14 years, 1 month ago](https://wordpress.org/support/topic/write-to-php-code/#post-2704282)
 * You really can’t put PHP to execute using that editor.
 * If you just want to display the code, there are many good syntax highlighters
   that make the code readable in a page or post.
 * This is the one I use, there are many others.
 * [http://wordpress.org/extend/plugins/syntaxhighlighter/](http://wordpress.org/extend/plugins/syntaxhighlighter/)
 * If that PHP code is for executing, you may want to create a custom page template.
 * [http://codex.wordpress.org/Stepping_Into_Templates](http://codex.wordpress.org/Stepping_Into_Templates)
 * Or if it’s something more dynamic, try creating a shortcode so that the PHP gets
   executed when/where the shortcode is.
 * [http://codex.wordpress.org/Shortcode_API](http://codex.wordpress.org/Shortcode_API)

Viewing 1 replies (of 1 total)

The topic ‘Write to php code’ is closed to new replies.

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/write-to-php-code/#post-2704282)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
