Title: Adding code to static page body
Last modified: August 19, 2016

---

# Adding code to static page body

 *  Resolved [drabina](https://wordpress.org/support/users/drabina/)
 * (@drabina)
 * [17 years ago](https://wordpress.org/support/topic/adding-code-to-static-page-body/)
 * I have static page that has text intro under which I would like to display list
   of categories. I was pointed to the “wp_list_categories” function that will give
   me what I need. My question is, can I use that directly on the page edit screen?
   When I type:
 *     ```
       <?php
       wp_list_categories('orderby=name'); ?>
       ```
   
 * I get just the code text on the final page. No categories. And yes, I am using
   HTML mode for the text editor.
 * Thanks.

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

 *  [shane-g](https://wordpress.org/support/users/shane-g/)
 * (@shane-g)
 * [17 years ago](https://wordpress.org/support/topic/adding-code-to-static-page-body/#post-1029472)
 * Hi,
 * You can add the code in the static page of wordpress and if you are receiving
   any error message then provide it…
 * Thanks,
 * Shane G.
 *  Thread Starter [drabina](https://wordpress.org/support/users/drabina/)
 * (@drabina)
 * [17 years ago](https://wordpress.org/support/topic/adding-code-to-static-page-body/#post-1029624)
 * I am not receiving any error messages. It is that the page prints my PHP code
   without actually parsing and executing it.
 *  Thread Starter [drabina](https://wordpress.org/support/users/drabina/)
 * (@drabina)
 * [17 years ago](https://wordpress.org/support/topic/adding-code-to-static-page-body/#post-1029627)
 * Figured it out. I needed plugin Exec-PHP.

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

The topic ‘Adding code to static page body’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [drabina](https://wordpress.org/support/users/drabina/)
 * Last activity: [17 years ago](https://wordpress.org/support/topic/adding-code-to-static-page-body/#post-1029627)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
