Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End executing a php code inside wordpress post or page template

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27345

    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

    #68747

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

    #68764
    hydrozova
    Member

    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)
  • The forum ‘Back End’ is closed to new topics and replies.