Title: Php in a post
Last modified: August 18, 2016

---

# Php in a post

 *  Anonymous
 * [21 years, 10 months ago](https://wordpress.org/support/topic/php-in-a-post/)
 * How can I put php statements in a blog post? I’ve tried just typing it in but
   it converts all of it to plain html.

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

 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/php-in-a-post/#post-78563)
 * For people to read you mean ?
    Write what you want to post and then use the widgetencoder–
   [http://resources.wordpress.org/tools/encode/](http://resources.wordpress.org/tools/encode/)–
   or try the codefilter – [http://www.asymptomatic.net/wp-hacks](http://www.asymptomatic.net/wp-hacks)
 *  Thread Starter Anonymous
 * [21 years, 10 months ago](https://wordpress.org/support/topic/php-in-a-post/#post-78567)
 * More like I want to include a list of all my recent links so I’d type
    < ?php
   rp_recentlinks(); ?> But like you see here it displays just that no my recent
   links. It’s not calling the function.
 *  [Mark (podz)](https://wordpress.org/support/users/podz/)
 * (@podz)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/php-in-a-post/#post-78569)
 * Why would you have that in a post ? That code is for the menu ?
    PHP cannot be
   put into a post – it will be parsed by the wp engine and won’t work.
 *  [codergurl](https://wordpress.org/support/users/codergurl/)
 * (@codergurl)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/php-in-a-post/#post-78573)
 * [http://stevarino.com/2004/03/wordpress-hack-php-entries/](http://stevarino.com/2004/03/wordpress-hack-php-entries/)
 *  Thread Starter Anonymous
 * [21 years, 10 months ago](https://wordpress.org/support/topic/php-in-a-post/#post-78586)
 * I might want it if I’m using a post for a well some what static page of links.
   Seeing as how wordpress doesn’t seem to support static pages very gracefully 
   at the moment.
 *  [TechGnome](https://wordpress.org/support/users/techgnome/)
 * (@techgnome)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/php-in-a-post/#post-78589)
 * No it doesn’t…. but there are ways around it. One possibility exists here [on my site.](http://techgnome.anderson-website.net/posts/2004/02/19/static-wp-pages-made-easy/)
   It’s a bit outdated, as I wrote it for WP 1.1, but it can be easily updated. 
   There are a few other possibilities as well, just search for EZStatic, or “Static
   Pages”.
    TG
 *  Thread Starter Anonymous
 * [21 years, 10 months ago](https://wordpress.org/support/topic/php-in-a-post/#post-78592)
 * Yes there are and I’m currently using faked folders (which uses posts for the
   static content) but there’s 2 problems with your approach.
    1) I’ve now got multiple
   pages I must maintain. If I change my index.php in the slightest I’ve got to 
   go to all my static pages and duplicate the change. Yes this can be fixed with
   includes but that can get just as messy IMHO. 2) It would be just as easy to 
   write up a plain html file as do what you purpose. If I’m not going to use wordpress
   for my static pages then what’s the point? There’s other cms’s out there that
   do that it’s just that they’re to big for my web account. Using wordpress I get
   the advantage of the web-based editor and the information stored in the database.
   Neither of which your solution addresses. (technically I could edit it in the
   template editor but that’s not quite what I’m looking for) I’m not saying your
   solution and those like it are bad just that it doesn’t fit my needs. Neither
   does faked folders fit 100% for that matter. But I decided to go with that and
   so therefore I need to find a solution to run php from a post if I want to use
   php on my static pages. I believe stevarino has a viable alternative although
   I’m tring to avoid the my-hacks bit. After quite a bit of searching and I believe
   luck I found [ this](http://mark.scottishclimbs.com/archives/2004/07/02/running-php-in-wordpress-posts/)
   which is a plugin based solution that does just what stevarino is doing I think.
   Thank you for your help.
 *  [TechGnome](https://wordpress.org/support/users/techgnome/)
 * (@techgnome)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/php-in-a-post/#post-78603)
 * No prob… I’ll be the first to admit that my version isn’t for everyone, but at
   the time it fit my needs – which it no longer does, and am looking to have a 
   similar solution to what you are looking for. The link you provided to steverino
   is quite helpful in that respect and looks to be the missing peice I needed.
   
   TG PS: Does any one else besides me find it funny to run PHP to dynamically create“
   static” pages? Seems contradictive… ;P
 *  Thread Starter Anonymous
 * [21 years, 10 months ago](https://wordpress.org/support/topic/php-in-a-post/#post-78607)
 * >  PS: Does any one else besides me find it funny to run PHP to dynamically create“
   > static” pages? Seems contradictive… ;P
 * Not really. I use the php to maintain the page in a cms fashion. It’s easier 
   for me to have wordpress manage my link catagories and links as I add them and
   simply call a function for wordpress to display them for me. So I’ve got a static
   part which is basically a “These are my links” type deal. And a dynamic part 
   which might appear in many places so it can be easily maintained through the 
   recent_links plugin. I.e. I’ll be editing my links more often than the static
   content on that page.
 *  [stevarino](https://wordpress.org/support/users/stevarino/)
 * (@stevarino)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/php-in-a-post/#post-78653)
 * Anon: exactly. Also a lot features of an author’s layout (such as a blogroll)
   require scripting. For some pages to have them and others to not would be kinda
   awkward (especially if methods existed to allow it).
    codergurl: thanks for the
   plug! Would have done it myself, but you beat me to it. 😉 By the way, I also
   have my [Faked Folders plugin](http://stevarino.com/faked-folders): an attempt
   to create static pages that are as easy to manage as regular posts.
 *  [TechGnome](https://wordpress.org/support/users/techgnome/)
 * (@techgnome)
 * [21 years, 10 months ago](https://wordpress.org/support/topic/php-in-a-post/#post-78678)
 * My comment about dynamic/static pages was supposed to be tounge in cheek. Excuuuse
   me for trying to inject a little humor. I’ll just go back to my hole now.
    BTW:
   Stevarino – I get a 40 error on the link you gave. TG

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

The topic ‘Php in a post’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 11 replies
 * 5 participants
 * Last reply from: [TechGnome](https://wordpress.org/support/users/techgnome/)
 * Last activity: [21 years, 10 months ago](https://wordpress.org/support/topic/php-in-a-post/#post-78678)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
