How to add a php include in a post (2 posts)

  1. StackError
    Posted 8 years ago #


    I am relatively new to PHP and WordPress and i have been unable to find a solution to a small issue i have.
    I have several php pages that reside in an "include" folder that i was running in static web page on a regular website. I want to include these includes in posts.
    the includes are strings that pull real estate listings from a remote MySQL database. The code is displayed as text with hyperlinks to the actual listing site.
    I have seen a few plugins that allow this in templates, but this won't work in posts.
    any help will be highly appreciated!!

    Thank you,


  2. moshu
    Posted 8 years ago #

    For putting php code (like include) in a template file - you do NOT need any plugin! You didn't see it well...

    For using PHP in posts or Pages you DO need a plugin like phpexec, execphp, runphp and similar ones. Search.

Topic Closed

This topic has been closed to new replies.

About this Topic