WordPress is one of the best blogging platforms. This is the scenario, we have a custom PHP page which we want to integrate with the WordPress blog. Our PHP file which we are getting to integrate might not use any of the WordPress APIs. Integrating PHP files with WordPress is very important for the back-end development of web design.
Step 1: Login to Microsoft Web Matrix
The following screen appears. Open or create your WordPress template.
Step 2: Create WordPress Template Page
We can start with a sample file and copy page.php, rename it on your choice and put it inside the theme folder ../wp-content/themes/mytheme/
This new file should start with the following content and then followed by the custom PHP content. This is the WordPress template.
Remember to upload this to the theme folder. Now the WordPress template is ready.
Step 3: Create WordPress Page
Click the “Pages” link from the WordPress Dashboard. The template we created can be used to create this new page. We can give the Page name and choose the “Template” from the drop-down from the “Page Attributes” section. There the PHP-page we uploaded will come with the “GeeksfoGeeks” listed in the dropdown. Now publish. Here we go, we have created a WordPress PHP page using our custom code. Whenever this page is linked, our custom PHP code will get executed. Various types of templates can be created through it.
Example: In functions, you need to implement it as follows:
A real-time scenario is we will construct a sitemap page using this WordPress template option.
- How to pass form variables from one page to other page in PHP ?
- How to display search result of another page on same page using ajax in JSP?
- How to show Page Loading div until the page has finished loading?
- How to redirect a page to another page in HTML ?
- How to add API function to a simple PHP Page ?
- Making your WordPress Website More Secure
- Step by Step guide to Write your own WordPress Template
- Step by step guide to make your first Wordpress Plugin
- How to backup WordPress database ?
- How to Launch a WordPress Website using Amazon EC2 Server ?
- How to perform wordpress security auditing?
- Difference between Drupal, Joomla and Wordpress
- WordPress Themes And Plugins
- Difference Between Magento and WordPress
- How to include Search box in your wordpress website ?
- How to enable customers to know if your wordpress website delivers at their pincode or not?
- How to add innerHTML to print page?
- How to add Google map inside html page without using API key ?
- How to add custom google search bar inside your web-page?
- PHP Program to count Page Views
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.