Reputation: 505
OK. I have page template called "bannerpage.php". How do I call this page so that the contents of this page are displayed on the homepage.php
I know that most common templates that have associated template tags (i.e., , , , etc.), can be called but I don't know how to call a "non-standard" template like bannerpage.php in Wordpress.
Any help would be much appreciated.
Upvotes: 1
Views: 9901
Reputation: 6000
The best way is to choose your page template from the backend page.
Or..You can also include it in home page by :
include('bannerpage.php');
Upvotes: 3
Reputation: 1566
Use get_template_part();
Load a template part into a template (other than header, sidebar, footer). Makes it easy for a theme to reuse sections of code and an easy way for child themes to replace sections of their parent theme.
From WordPress Codex
Upvotes: 0