Loading…

How we can create a template in WordPress?

We can create templates for various purpose like if we want to make a different layout rather than a home page or if we want to display custom posts types like news than we can create a template and merely display all news there.

Steps to create template in wordpress themes.
  • Create a news.php file on root in theme folder.
  • Insert get_header(); and get_footer(); in news.php page
  • Add <?php /* Template Name: News Template */ ?> in top of this created page. Now this template name is "News Template".

Suggest An Answer

No suggestions avaliable!

Latest post from WordPress Interview Questions

Ask Question