I am going through an online Udemy course alongside it I'm building my own little website.
The website has 4 pages 1 of them a front page that I've created front-page.php and the rest of the pages will be using the page.php template but different content embedded in them.
My plan is to have the page.php call the relevant content based on the page-id for instance for a warranty page the code would look like this.
get_header();?>
get_template_part( 'template-parts/content', get_the_ID());
//getting the content from templates based on ID?>
Or
get_template_part( 'template-parts/content', get_the_title());
//And get the content based on the title of the page
so I guess my question is, is this the correct way of doing this or how else more efficient way would you go about doing this?
Cheers!!!