levani01
Member
Posted 3 years ago #
I want to have page with php code but don't know how to do it. If I creat page from admin panel I can't insert php code as wordpress doesn't allow this. If I create new php file manualy and upload it in my theme directory what would the address look like?
I want to include the head, sidebar and footer in this file but the content shoud be php code. How can I do it?
If you want to include php in your entries you can use a plugin like exec php.
levani01
Member
Posted 3 years ago #
mrmist
But exec php doesn't allow to use include function...
How can I include custom theme file in wordpress page?
misiek303
Member
Posted 3 years ago #
put the function there which include your page
You can use php code in a custom page template for this page. I made my page templates by duplicating and then modifying my theme's page.php.
http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates