0
votes

Wordpress themes have standard file such as header.php, footer.php, index.php, functions.php, style.css, ... How to add a php file to wordpress theme addition of standard files? for example I want add a news.php to display specific posts in it, please help me

1

1 Answers

4
votes

Just add a new file (e.g. news.php), and put the template comment at the very beginning:

<?php
/*
Template Name: News Template
*/

Then, go to your Wordpress backend, create a new page, and select the template you created:

enter image description here