0

Good day guys! I created a php file named test.php and i put a simple code

<h1> Sample Text </h1>

How to call my custom page to front-page.php just like how get_header() and get_footer() are called?

  • Is your custom file in the same directory as front-page.php? – Karun Apr 4 at 6:03
0

Do you want to include your test.php in front-page.php? You can use get_template_part() for this. As parameter use the path to file without ending, e.g. if it is in root: <?php get_template_part('test'); ?>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.