The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

executing a php code inside wordpress post or page template

  • # December 27, 2009 at 9:42 am

    I Really need help in this issue
    i created an english placement test using php , now i want to integrate it in my wordpress , using page template or post
    i tried a lot but the php code is never executed
    the questions is supposed to be retrieved from a database , but that is never happen inside the wordpress

    can you help me please

    # December 29, 2009 at 1:22 pm

    That’s because wordpress by default won’t execute PHP stored in a post. You need to use a plugin such as Exec-PHP.

    # December 30, 2009 at 2:52 am

    i think you are trying to run php code inside post….
    but you can’t do it because wordpress wont let u do it.

    if you want to do it then you should first put an condition on single.php files in themes folder
    there you need to write if post_id is your post then execute your code….
    it will definitely works

    I’ve done it before in my web site.

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

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed