Many days ago i wanted to create a custom page for my WordPress blog that will execute my php code in it, whilst remaining a part of the overall site css/theme/design. The php code would make use of 3rd party APIs (so I need to include other php files). so i was wondering that how do I accomplish this? i got the solution which is pretty simple.
Even You don't need to interact with the API, or use a plugin.
- First, duplicate post.php or page.php in your theme folder (under /wp-content/themes/themename/).
- Rename the new file as templatename.php (where templatename is what you want to call your new template!). Enter the following at the top of the new file:
- You can modify this file (using php) to include other files or whatever you need.
- Then create a new page in your wordpress blog, and in the page editing screen you'll see a 'Template' dropdown in the 'Attributes' widget to the right. Select your new template and publish the page.
- Your new page will use the php code defined in templatename.php
that's it - you'r done ! isn't is so simple ? :)
Hope you have enjoyed to read this post,
let me know if you have more suitable suggestions.
you might be more interested in Wordpress Theme Customization,Wordpress Customization Services, Freelance Wordpress Developer, PHP Freelancing india, Freelance Wordpress Web Designer,Wordpress Development,WebMasters,Content Management System, wordpress, Wordpress Development, Wordpress Freelancer
Good Day [/ Night] ! Happy Google + ing !