Saturday, December 7, 2013

How to add a php page to Wordpress ?

Wordpress Developer India


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:



<?php 

/* Template Name: templatename */

 ?>

  • 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 !

3 comments:

  1. Here is good information and good worker. I am happy to read about add a php page to Wordpress.Thanks for share this worthy information
    Hire Dedicated Resources

    ReplyDelete
  2. The information you shared was useful. Thank you for taking the time to organize it. Mitroz Technologies is a professional software development firm in Pune India. We furnish our services and best solutions to our customers. We deliver great websites and mobile apps of every size to our clients. If you require any further information related to software, web or mobile app development, feel free to contact us at +91 7066734606 or drop an email atinfo@mitroztech.com. Please go through our website www.mitroztech.com for more information.

    ReplyDelete
  3. Excellent Article! Such a nice information. Hire experienced and dedicated php developer , Asp.Net Developers, Mobile application developer for custom PHP applications and web development

    ReplyDelete

Any Questions or Suggestions ?

About

Professional & Experienced Freelance Developer From India, Technologist, Software Engineer, internet marketer and Open Sources Developer with experience in Finance, Telecoms and the Media. Contact Me for freelancing projects.

Enter your email address:

Delivered by FeedBurner