Grow your CSS skills. Land your dream job.

executing a php code inside wordpress post or page template

  • # December 27, 2009 at 9:42 am

    Hi
    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
    http://mercycom.com/academy/testing-english/
    the questions is supposed to be retrieved from a database , but that is never happen inside the wordpress

    can you help me please
    thanks
    Rasha

    # 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

    hi
    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.
    Regards:
    Vijay

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".