// Create a custom page using template and link to php file
--
Step 1 :
/* Create a php file in your active themes root directory.
(Idealy in a child theme!) */
page_name.php /* (generally good to use snake case or pascal case) */
Step 2 :
/* Inside you page_name.php file add this, */
<?php /* Template Name: any_name.php */ ?>
Step 3 :
/* Now you can create a wordpress page like normal and link it to that
file by selecting a page template. (in the right sidebar by page options)
The template name will be whatever you added in the for the snippet */
// <?php /* Template Name: any_name.php */ ?>
I used "Editing Your Custom Page Template" method
reference:
https://www.wpbeginner.com/wp-themes/how-to-create-a-custom-page-in-wordpress/