How to add dynamic PHP page in wordpress

To add dynamic PHP page in wordpress

1) Create a page home_new.php with below content

/* Template Name: home new page */ get_header();
echo “Hello”;

2) Upload this php file into selected Theme home folder

3) Create a new page from admin side

Select home new page (This is what we added in step 1) in the template list from right side

4) Find the newly created page link

you can see the out put ” Hello”

5) whateverv php code you added in home_new.php will come in that link

Leave a Reply

Your email address will not be published. Required fields are marked *