WordPress.org

Ready to get started?Download WordPress

Forums

How can i add PHP code to a WordPress page? (9 posts)

  1. sherrill99
    Member
    Posted 8 years ago #

    I've created a page and i'm just trying to add a simple contact form. I see that I can add HTML on a page, how would I add my PHP form?

    Anyone?

  2. moshu
    Member
    Posted 8 years ago #

    Unless you use a plugin like PHPexec, RunPHP or ExecPHP (always confused by these names;) you cannot.

    For contactform I'd consider the Contact Form plugin:
    http://ryanduff.net/projects/wp-contactform/
    (check out to make sure you get the latest version)

  3. sherrill99
    Member
    Posted 8 years ago #

    Thanks moshu,

    Bummer, I figured there was some easy hack out there for doing this.

  4. alvanweb
    Member
    Posted 8 years ago #

    I prefer igsyntax-hiliter plugin!
    Not only for HTML and PHP codes but for most programming language such as C,SQL,ASP,CSS and so on ...

  5. sherrill99
    Member
    Posted 8 years ago #

    Cool thanks alvan, is igsyntax secure?

  6. moshu
    Member
    Posted 8 years ago #

    alvan,
    I am afraid your reply isn't really related to the OP. It was about using PHP code in a post/Page - not about displaying code. The plugin you linked to serves for displaying code in posts. Very different thing :)

  7. alvanweb
    Member
    Posted 8 years ago #

    oh
    yes, i am sorry to trouble you
    with igsyntax-hiliter you can put codes in your posts
    no in php page! for adding php codes between HTMLS use this method:<? PHP CODES ?> no plugin require.
    if you want create contact form, the moshu plugin in second post is best!

  8. panoptican
    Member
    Posted 8 years ago #

    so is there a way to do this cause i was just coming over here to ask this very question. i tried what i think was a suggestion from alvanweb but that didn't do anything...

  9. panoptican
    Member
    Posted 8 years ago #

    erm, nevermind. phpexec.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags